src/HOL/Tools/Nitpick/nitpick_hol.ML
changeset 41472 f6ab14e61604
parent 41052 3db267a01c1d
child 41791 01d722707a36
equal deleted inserted replaced
41471:54a58904a598 41472:f6ab14e61604
   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