Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > "type definition spec inside of sharing"
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 5th November 05:51
denis bueno
External User
 
Posts: 1
Default "type definition spec inside of sharing"



I'm getting a compiler error with SML/NJ 110.55 that is not listed at
http://www.smlnj.org/doc/errors.html. Google isn't helpful either. (2
results, both of which are newsgroup postings to c.l.ml but whose pages
are long gone.)


(* Code ***************************)
signature Example = sig

type a = string

structure ASet: ORD_SET
sharing type ASet.Key.ord_key = a

end
(* End code ***********************)

This code produces the following error:

/tmp/sml28780PxX:18.1-25.4 Error: type definition spec inside of sharing
at: a

uncaught exception Error
raised at: ../compiler/TopLevel/interact/evalloop.sml:63.48-63.56
../compiler/TopLevel/interact/evalloop.sml:44.55
../compiler/TopLevel/interact/evalloop.sml:291.17-291.20

Any ideas? I'm trying to share the ord_key type because then modules
outside of Example will be able to "convert" from the ASet.item type to
whatever the item actually *is*. In this case, an Example.a, or string.

-Denis
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666