[MLton] mlb files and the ML Kit
Stephen Weeks
MLton@mlton.org
Mon, 15 Mar 2004 08:44:43 -0800
> We could perhaps issue a warning if a file (is mentioned multiple
> times). In most cases, I belive it would be a mistake,
A warning sounds reasonable, at least if the mention is twice in the
same mlb file. Twice in different mlb files I'm not so sure.
> but perhaps the programmer would use the feature to write poor-man
> functors.
The thought had occurred to me as well.
> I don't think that is enough. Consider the mlb-file:
>
> bad.mlb:
> A.sml B.sml C.sml D.sml B.sml E.sml
>
> and the content map
>
> A.sml: type t0 = int
> B.sml: datatype t = T of t
> C.sml: val a = T 4
> D.sml: type t0 = bool
> E.sml: val _ = case a of T b => print (Bool.toString b)
>
> Here the ``type name'' "B.sml-t" is not sufficient to ensure type
> soundness... But I think I can use the position in the mlb-file to get
> things to work.
That makes sense.