equal
deleted
inserted
replaced
195 |
195 |
196 fun with_repaired_path f (fp_sugar as {T, ...} : fp_sugar) thy = |
196 fun with_repaired_path f (fp_sugar as {T, ...} : fp_sugar) thy = |
197 thy |
197 thy |
198 |> Sign.root_path |
198 |> Sign.root_path |
199 |> Sign.add_path (Long_Name.qualifier (fst (dest_Type T))) |
199 |> Sign.add_path (Long_Name.qualifier (fst (dest_Type T))) |
200 |> f fp_sugar |
200 |> (fn thy => f (morph_fp_sugar (Morphism.transfer_morphism thy) fp_sugar) thy) |
201 |> Sign.restore_naming thy; |
201 |> Sign.restore_naming thy; |
202 |
202 |
203 val fp_sugar_interpretation = FP_Sugar_Interpretation.interpretation o with_repaired_path; |
203 val fp_sugar_interpretation = FP_Sugar_Interpretation.interpretation o with_repaired_path; |
204 |
204 |
205 fun register_fp_sugar key fp_sugar = |
205 fun register_fp_sugar key fp_sugar = |
1443 |
1443 |
1444 val parse_co_datatype = parse_ctr_options -- Parse.and_list1 parse_spec; |
1444 val parse_co_datatype = parse_ctr_options -- Parse.and_list1 parse_spec; |
1445 |
1445 |
1446 fun parse_co_datatype_cmd fp construct_fp = parse_co_datatype >> co_datatype_cmd fp construct_fp; |
1446 fun parse_co_datatype_cmd fp construct_fp = parse_co_datatype >> co_datatype_cmd fp construct_fp; |
1447 |
1447 |
|
1448 val _ = Context.>> (Context.map_theory FP_Sugar_Interpretation.init); |
|
1449 |
1448 end; |
1450 end; |