comparison src/corify.sml @ 1527:cccf8bf64b30

Fix opening of shadowing, principal-signatured modules that open other modules
author Adam Chlipala <adam@chlipala.net>
date Thu, 04 Aug 2011 16:44:05 -0400
parents 913d9c2f55c9
children 0577be31a435
comparison
equal deleted inserted replaced
1526:b5d78407886d 1527:cccf8bf64b30
210 fun lookupConByName ({current, ...} : t) x = 210 fun lookupConByName ({current, ...} : t) x =
211 case current of 211 case current of
212 FFfi {mod = m, ...} => CFfi m 212 FFfi {mod = m, ...} => CFfi m
213 | FNormal {cons, ...} => 213 | FNormal {cons, ...} =>
214 case SM.find (cons, x) of 214 case SM.find (cons, x) of
215 NONE => raise Fail "Corify.St.lookupConByName" 215 NONE => raise Fail ("Corify.St.lookupConByName " ^ x)
216 | SOME n => CNormal n 216 | SOME n => CNormal n
217 217
218 fun bindVal {basis, cons, constructors, vals, strs, funs, current, nested} s n = 218 fun bindVal {basis, cons, constructors, vals, strs, funs, current, nested} s n =
219 let 219 let
220 val n' = alloc () 220 val n' = alloc ()
273 (case SM.find (vals, x) of 273 (case SM.find (vals, x) of
274 NONE => raise Fail ("Corify.St.lookupValByName: no type for FFI val " ^ x) 274 NONE => raise Fail ("Corify.St.lookupValByName: no type for FFI val " ^ x)
275 | SOME t => EFfi (m, t)) 275 | SOME t => EFfi (m, t))
276 | FNormal {name, vals, ...} => 276 | FNormal {name, vals, ...} =>
277 case SM.find (vals, x) of 277 case SM.find (vals, x) of
278 NONE => raise Fail ("Corify.St.lookupValByName " ^ String.concatWith "." name ^ "." ^ x) 278 NONE => raise Fail ("Corify.St.lookupValByName " ^ String.concatWith "." (rev name) ^ "." ^ x)
279 | SOME n => ENormal n 279 | SOME n => ENormal n
280 280
281 fun bindConstructor {basis, cons, constructors, vals, strs, funs, current, nested} s n n' = 281 fun bindConstructor {basis, cons, constructors, vals, strs, funs, current, nested} s n n' =
282 let 282 let
283 val current = 283 val current =