comparison src/elab.sml @ 2190:22117edf8fd3

After a tricky debugging session, limit visibility of type-class instances from anonymous modules
author Adam Chlipala <adam@chlipala.net>
date Sun, 01 Nov 2015 16:33:14 -0500
parents 403f0cc65b9c
children
comparison
equal deleted inserted replaced
2189:43393a4a66ce 2190:22117edf8fd3
136 | EDValRec of (string * con * exp) list 136 | EDValRec of (string * con * exp) list
137 137
138 withtype exp = exp' located 138 withtype exp = exp' located
139 and edecl = edecl' located 139 and edecl = edecl' located
140 140
141 (* We have to be careful about crawling automatically generated signatures recursively,
142 * importing all type-class instances that we find.
143 * The reason is that selfification will add signatures of anonymous structures,
144 * and it's counterintuitive for instances to escape anonymous structures! *)
145 datatype import_mode = Import | Skip
146
141 datatype sgn_item' = 147 datatype sgn_item' =
142 SgiConAbs of string * int * kind 148 SgiConAbs of string * int * kind
143 | SgiCon of string * int * kind * con 149 | SgiCon of string * int * kind * con
144 | SgiDatatype of (string * int * string list * (string * int * con option) list) list 150 | SgiDatatype of (string * int * string list * (string * int * con option) list) list
145 | SgiDatatypeImp of string * int * int * string list * string * string list * (string * int * con option) list 151 | SgiDatatypeImp of string * int * int * string list * string * string list * (string * int * con option) list
146 | SgiVal of string * int * con 152 | SgiVal of string * int * con
147 | SgiStr of string * int * sgn 153 | SgiStr of import_mode * string * int * sgn
148 | SgiSgn of string * int * sgn 154 | SgiSgn of string * int * sgn
149 | SgiConstraint of con * con 155 | SgiConstraint of con * con
150 | SgiClassAbs of string * int * kind 156 | SgiClassAbs of string * int * kind
151 | SgiClass of string * int * kind * con 157 | SgiClass of string * int * kind * con
152 158