equal
deleted
inserted
replaced
123 (* produces the rep or abs constant for a qty *) |
123 (* produces the rep or abs constant for a qty *) |
124 fun absrep_const flag ctxt qty_str = |
124 fun absrep_const flag ctxt qty_str = |
125 let |
125 let |
126 (* FIXME *) |
126 (* FIXME *) |
127 fun mk_dummyT (Const (c, _)) = Const (c, dummyT) |
127 fun mk_dummyT (Const (c, _)) = Const (c, dummyT) |
128 | mk_dummyT _ = error "Expecting abs/rep term to be a constant" |
128 | mk_dummyT (Free (c, _)) = Free (c, dummyT) |
|
129 | mk_dummyT _ = error "Expecting abs/rep term to be a constant or a free variable" |
129 in |
130 in |
130 case Quotient_Info.lookup_abs_rep ctxt qty_str of |
131 case Quotient_Info.lookup_abs_rep ctxt qty_str of |
131 SOME abs_rep => |
132 SOME abs_rep => |
132 mk_dummyT (case flag of |
133 mk_dummyT (case flag of |
133 AbsF => #abs abs_rep |
134 AbsF => #abs abs_rep |