structure descriptions and where structure?
Geoffrey Alan Washburn <[email protected]>
| Newsgroups | gmane.comp.lang.sml.smlnj |
|---|---|
| Message-ID | <[email protected]> |
I was thinking briefly about how "where structure" might be implemented
today, when I discovered while looking at _The Definition of Standard ML
(Revised)_ that I seem to have been making use of a feature in SML/NJ
that is not part of the definition, namely, I have been using the
following quite a bit recently
signature FOO = sig
(* ... *)
structure Baz : BAZ = ABaz
(* then more stuff *)
end
just looking at the definition and the HaMLet implementation indicate
that only
signature FOO = sig
(* ... *)
structure Baz : BAZ
(* then more stuff *)
end
is allowed. This leads me to ask (a) is there a paper somewhere that
describes SML/NJ's implementation of this extension, (b) do any other
SML implementations have this extension, and (c) is there a reason that
SML/NJ does not implement "where structure" already? As is, this is a
very useful extension, but it would be even better in conjunction with
"where structure". Furthermore, while studying the problem I noticed
that in the definition
signature FOO = sig
type t = int
end
is not strictly allowed but is a derived form for
signature FOO = sig
include
sig type t end
where type t = int
end
Which lead me to wonder why might
signature FOO = sig
structure Baz : BAZ = ABaz
end
not be a derived form of
signature FOO = sig
include
sig structure Baz : BAZ end
where structure Baz = ABaz
end
in SML/NJ. In any event, perhaps this will lead some discussion that
can evolve into a proposal for "where structure" on the Successor ML wiki.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click