From: "Chris Rathman" <[EMAIL PROTECTED]>

  http://www.angelfire.com/tx4/cus/alice/alice3.html

In trying the code in Alice, I'm getting an error that I don't see in SML-NJ. Specifically the "In" constructor used in the wrap function is complaining about:

../a.aml:109.16-109.18: datatype `t' belonging to constructor `In' is not accessible

Yes, this is one of the more annoying limitations of the current compiler, see:

http://www.ps.uni-sb.de/alice/manual/incompatibilities.html#datatypes

I'm assuming that the datatype t is getting shadowed, but I'm not sure if there is a workaround?

Either of the following should solve your problem:

1. Qualify occurrences of the constructor In with its module name, i.e. Arithmetic.In.

2. Move the type declaration for t to the end of the functor body (and either drop the type annotation for val coercions, or qualify type t as A.t there).

3. Rename type t either in structure Arithmetic, or in signature GEN.

4. Do not rename t, but define it only as a synonym for the actual datatypes (like in most of the Alice libraries).

Hope this helps,
- Andreas


_______________________________________________
alice-users mailing list
[email protected]
http://www.ps.uni-sb.de/mailman/listinfo/alice-users

Reply via email to