Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ml > Warning: type v...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 916 of 968
Post > Topic >>

Warning: type vars not generalized because of, value restriction

by JT <jt@[EMAIL PROTECTED] > Aug 20, 2007 at 12:49 PM

Chris Reade escreveu:
> John
> 
> In the "EFP" book  a small circle is used for composition with an  
> explanation that this is written as a lower case o in ML (not a dot).
> Also the definition in the book is not as you have written it.  It  
> should be:
> 
> fun f1 (x,y,z) = (x,y,1)
> fun f2 (x,y,z) = (x,y,z * x)
> fun f3 (x, y,z) = (x + 1, y, z)
> val body = f3 o f2
> 
> Chris Reade
> 

Hi --

Upon evaluating this, an error crops up. I have no idea as to what it 
means.


- fun f1 (x,y,z) = (x,y,1);
val f1 = fn : 'a * 'b * 'c -> 'a * 'b * int
- fun f2 (x,y,z) = (x,y,z*x);
val f2 = fn : int * 'a * int -> int * 'a * int
- fun f3 (x,y,z) = (x + 1, y, z);
val f3 = fn : int * 'a * 'b -> int * 'a * 'b
- val body = f3 o f2;
stdIn:5.5-5.19 Warning: type vars not generalized because of
    value restriction are instantiated to dummy types (X1,X2,...)
val body = fn : int * ?.X1 * int -> int * ?.X1 * int

This must have something to do with the newer SML 97 standard.
Any help is appreciated.
JT.
 




 1 Posts in Topic:
Warning: type vars not generalized because of, value restricti
JT <jt@[EMAIL PROTECTE  2007-08-20 12:49:53 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 5:30:33 CDT 2008.