comparison src/compiler.sml @ 1264:79b2bcac6200

Fix bug in module path generation with module roots; push wildification through substructures
author Adam Chlipala <adamc@hcoop.net>
date Thu, 27 May 2010 10:56:52 -0400
parents beb67ff4c8a0
children 459a334345ae
comparison
equal deleted inserted replaced
1263:be2ef50780ed 1264:79b2bcac6200
867 NONE => (Source.StrVar (nameOf final), loc) 867 NONE => (Source.StrVar (nameOf final), loc)
868 | SOME (root, name) => 868 | SOME (root, name) =>
869 let 869 let
870 val m = (Source.StrVar name, loc) 870 val m = (Source.StrVar name, loc)
871 val final = String.extract (final, size root + 1, NONE) 871 val final = String.extract (final, size root + 1, NONE)
872 val fields = String.fields (fn ch => ch = #"/") final
873 val fields = List.filter (fn s => size s = 0
874 orelse not (Char.isDigit (String.sub (s, 0))))
875 fields
872 in 876 in
873 foldl (fn (x, m) => (Source.StrProj (m, capitalize x), loc)) 877 foldl (fn (x, m) => (Source.StrProj (m, capitalize x), loc))
874 m (String.fields (fn ch => ch = #"/") final) 878 m fields
875 end 879 end
876 880
877 val ds = dsFfi @ ds 881 val ds = dsFfi @ ds
878 @ [(Source.DExport final, loc)] 882 @ [(Source.DExport final, loc)]
879 883