273 |
273 |
274 datatype fixpoint_kind = Lfp | Gfp | NoFp |
274 datatype fixpoint_kind = Lfp | Gfp | NoFp |
275 datatype boxability = |
275 datatype boxability = |
276 InConstr | InSel | InExpr | InPair | InFunLHS | InFunRHS1 | InFunRHS2 |
276 InConstr | InSel | InExpr | InPair | InFunLHS | InFunRHS1 | InFunRHS2 |
277 |
277 |
278 structure Data = Generic_Data( |
278 structure Data = Generic_Data |
|
279 ( |
279 type T = {frac_types: (string * (string * string) list) list, |
280 type T = {frac_types: (string * (string * string) list) list, |
280 codatatypes: (string * (string * styp list)) list} |
281 codatatypes: (string * (string * styp list)) list} |
281 val empty = {frac_types = [], codatatypes = []} |
282 val empty = {frac_types = [], codatatypes = []} |
282 val extend = I |
283 val extend = I |
283 fun merge ({frac_types = fs1, codatatypes = cs1}, |
284 fun merge ({frac_types = fs1, codatatypes = cs1}, |
284 {frac_types = fs2, codatatypes = cs2}) : T = |
285 {frac_types = fs2, codatatypes = cs2}) : T = |
285 {frac_types = AList.merge (op =) (K true) (fs1, fs2), |
286 {frac_types = AList.merge (op =) (K true) (fs1, fs2), |
286 codatatypes = AList.merge (op =) (K true) (cs1, cs2)}) |
287 codatatypes = AList.merge (op =) (K true) (cs1, cs2)} |
|
288 ) |
287 |
289 |
288 val name_sep = "$" |
290 val name_sep = "$" |
289 val numeral_prefix = nitpick_prefix ^ "num" ^ name_sep |
291 val numeral_prefix = nitpick_prefix ^ "num" ^ name_sep |
290 val sel_prefix = nitpick_prefix ^ "sel" |
292 val sel_prefix = nitpick_prefix ^ "sel" |
291 val discr_prefix = nitpick_prefix ^ "is" ^ name_sep |
293 val discr_prefix = nitpick_prefix ^ "is" ^ name_sep |