Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ml > Problem with CM...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 893 of 968
Post > Topic >>

Problem with CM.make

by Hossein <hossein.haeri@[EMAIL PROTECTED] > Jun 8, 2007 at 11:34 PM

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 im****ted from $/
basis.cm@[EMAIL PROTECTED]
(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 im****ted 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
ex****ting an "augmented" version of some module. Example:

structure A = struct (* defines augmented A *)
open A (* refers to im****ted 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
 




 1 Posts in Topic:
Problem with CM.make
Hossein <hossein.haeri  2007-06-08 23:34:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 18:08:50 CDT 2008.