I have been making use of phantom types (for encoding a single-inheritance class hierarchy) and have encountered a case where code accepted by MLton does not type check with Poly/ML. After investigating, it appears that MLton, Poly/ML and SML/NJ all take different views on what is a valid program!

Attached are two small examples with a slight difference where type checking accepts/rejects as follows:

                        test-1.sml      test-2.sml

  MLton   20100608      accept          accept
  Poly/ML 5.4, latest   reject          accept
  SML/NJ  110.73        reject          reject

I don't know which of the above is consistent with the Definition yet. (I would be very glad if test-1 is a legal program though!)

Phil

Attachment: test-1.sml
Description: application/smil

Attachment: test-2.sml
Description: application/smil

_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to