Quot/quotient_info.ML
changeset 669 2ee3bc9899c0
parent 663 0dd10a900cae
child 675 94d6d29459c9
equal deleted inserted replaced
668:ef5b941f00e2 669:2ee3bc9899c0
    63   val thy = ProofContext.theory_of ctxt
    63   val thy = ProofContext.theory_of ctxt
    64   val tyname = Sign.intern_type thy tystr
    64   val tyname = Sign.intern_type thy tystr
    65   val mapname = Sign.intern_const thy mapstr
    65   val mapname = Sign.intern_const thy mapstr
    66   val relname = Sign.intern_const thy relstr
    66   val relname = Sign.intern_const thy relstr
    67 
    67 
       
    68   (* FIXME: if you don't handle the error you also get an error with a similar message: No such constant: "bla" *)
    68   fun check s = (Const (s, dummyT) |> Syntax.check_term ctxt)
    69   fun check s = (Const (s, dummyT) |> Syntax.check_term ctxt)
    69         handle _ => error ("Constant " ^ s ^ " not declared.")
    70         handle _ => error ("Constant " ^ s ^ " not declared.")
    70   val _ =  map check [mapname, relname]
    71   val _ =  map check [mapname, relname]
    71 in
    72 in
    72   maps_attribute_aux tyname {mapfun = mapname, relfun = relname}
    73   maps_attribute_aux tyname {mapfun = mapname, relfun = relname}