Gergely Buday wrote:
functor Main(M: sig end ) : sig val foo : int end =
struct
open M
con Field :: Name
val foo = 3
end
What is wrong with this?
The problem is the same as if you had merely written [val foo : int]
instead of [val foo = 3]: you are writing an _interface_ declaration
(i.e., "signature item") in a position that expects an _implementation_
declaration (just called "declaration" in the manual). There is no
declaration for generating a fresh name automatically; you would
probably take that name into the functor as an input.
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur