Re: datatype constructor as syntax

Florian Weimer <[email protected]>
Newsgroups gmane.comp.lang.ml.mlton.user
Message-ID <[email protected]>
* Henry Cejtin:

> Sorry,  I  thought  I  was  being  clever,  but  if  you look at Andreas
> Rossberg's Defects in the Revised Definition of Standard ML
>     http://www.ps.uni-saarland.de/Publications/documents/Rossberg_DefectsSML.pdf
> you will see that he points out that rule 126 of the  dynamic  semantics
> implies  that  this  should really give you a bind exception at runtime.
> This was fixed (meaning you get the in MLton way back in 2001 to give an
> error at compile time.

Curiously, the fun-based approach
 
  datatype mytype = foo | bar of int
  fun bar _ = ()
  val bar = 23

still runs without raising an exception when compiled with MLton.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.