Lazy ML extension and signatures

Matthias Kretschmer <[email protected]>
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>
Hello,

I had the problem, that I wanted to export a lazy datatype. I wanted to
mark it lazy, to use it outside in recursions without creating infinite
loops (for a small combinator library).

I thought of something like "type lazy foo" or "datatype lazy foo" in
the signature, but both don't work. Because I haven't found good
documentation of this issue, I thought I try my luck here. Hope this is
not documented somewhere and I simply overlooked it.

I want something like:

structure Foo : sig
  type lazy foo
end = struct
  datatype lazy foo = Foo of ... | Bar of ... | ...
end

(forgot to say, I tried it with SML/NJ 110.42 and SML/NJ 110.51)

-- 
Matthias Kretschmer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
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.