![]() |
sponsored links |
|
|
sponsored links
|
|
1
10th June 19:34
External User
Posts: 1
|
Dear all,
Whilst trying CM.make "sources.cm" (in SML/NJ v110.52), for the following such file: Library structure Slicer structure ErrorKind structure Parser is #if defined (NEW_CM) $/basis.cm $smlnj/viscomp/basics.cm $smlnj/viscomp/core.cm #endif Slicer.sml Configure.sml Statistic.sml Helpers/sources.cm .... I recieve this error message: [autoloading] [library $smlnj/cm/cm.cm is stable] [library $smlnj/internal/cm-sig-lib.cm is stable] [library $/pgraph.cm is stable] [library $smlnj/internal/srcpath-lib.cm is stable] [autoloading done] [scanning sources.cm] [library $smlnj/viscomp/basics.cm is stable] [library $smlnj/viscomp/core.cm is stable] [scanning (sources.cm):Helpers/sources.cm] sources.cm:18.3-18.21 Error: structure List imported from $/ basis.cm@176329(list.sml) and also from (sources.cm):Helpers/ (sources.cm):List.sml val it = false : bool Here is the contents of Helpers/List.sml: structure List = struct open List val mapActL : ('a * 'state -> 'b * 'state) -> 'a list * 'state -> 'b list * 'state .... Where section 2.4 of the latest CM manual (http://smlnj.org/doc/CM/ new.pdf) says: "If an ML source file f re-defines a name n that is also imported from library l, then the disambiguating rule is that the definition from f takes precedence over that from l in all sources except f itself. Free occurences of n in f refer to l's definition. This rule makes it possible to easily write code for exporting an "augmented" version of some module. Example: structure A = struct (* defines augmented A *) open A (* refers to imported A *) fun f x = B.f x + C.g (x + 1) end" Shouldn't the above disambiguating rule prevent SML/NJ from producing that error message? Or, am I missing anything? TIA, --Hossein |
|
|