TFL/tfl.sml
changeset 4221 ed0f67fb458b
parent 4149 a6ccec4fd0c3
child 4252 d5ccc8321e1e
equal deleted inserted replaced
4220:3cc85acd9ba8 4221:ed0f67fb458b
   222      let val pty as Type (ty_name,_) = type_of p
   222      let val pty as Type (ty_name,_) = type_of p
   223      in
   223      in
   224      case (ty_info ty_name)
   224      case (ty_info ty_name)
   225      of None => mk_case_fail("Not a known datatype: "^ty_name)
   225      of None => mk_case_fail("Not a known datatype: "^ty_name)
   226       | Some{case_const,constructors} =>
   226       | Some{case_const,constructors} =>
   227         let open Basis_Library (*restore original List*)
   227         let open BasisLibrary (*restore original List*)
   228 	    val case_const_name = #1(dest_Const case_const)
   228 	    val case_const_name = #1(dest_Const case_const)
   229             val nrows = List.concat (map (expand constructors pty) rows)
   229             val nrows = List.concat (map (expand constructors pty) rows)
   230             val subproblems = divide(constructors, pty, range_ty, nrows)
   230             val subproblems = divide(constructors, pty, range_ty, nrows)
   231             val groups      = map #group subproblems
   231             val groups      = map #group subproblems
   232             and new_formals = map #new_formals subproblems
   232             and new_formals = map #new_formals subproblems