Hi Rob,

F# also uses type inference variables, and will print them as as such for errors related to the value restriction. e.g. the program

1
2
let identity x = x
let identity' = identity identity;;

gives

<i>c:\a.ml(2,4): error: FS0030: Value restriction. Type inference has inferred the signature val identity' : ('_a -> '_a) but 'identity'' is not a syntactic function. Either define 'identity'' as a syntactic function, or add a type constraint to instantiate the type parameters.<i> However F# Interactive doesn't permit the generation and propagation of unresolved type inference variables - this is mostly to do with the fact that F# and .NET code generation is only possible once you have either generalized these variables or have resolved final value for them. Cheers! don

By on 2/26/2007 6:10 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper