src/HOLCF/Tools/Domain/domain_extender.ML
changeset 39974 b525988432e9
parent 39965 da88519e6a0b
child 39986 38677db30cad
equal deleted inserted replaced
39973:c62b4ff97bfc 39974:b525988432e9
   142                 (dname, map readTFree vs, mx)) eqs'''
   142                 (dname, map readTFree vs, mx)) eqs'''
   143       end;
   143       end;
   144 
   144 
   145     fun thy_type  (dname,tvars,mx) = (dname, length tvars, mx);
   145     fun thy_type  (dname,tvars,mx) = (dname, length tvars, mx);
   146     fun thy_arity (dname,tvars,mx) =
   146     fun thy_arity (dname,tvars,mx) =
   147       (Sign.full_name thy dname, map (snd o dest_TFree) tvars, @{sort rep});
   147       (Sign.full_name thy dname, map (snd o dest_TFree) tvars, arg_sort false);
   148 
   148 
   149     (* this theory is used just for parsing and error checking *)
   149     (* this theory is used just for parsing and error checking *)
   150     val tmp_thy = thy
   150     val tmp_thy = thy
   151       |> Theory.copy
   151       |> Theory.copy
   152       |> Sign.add_types (map thy_type dtnvs)
   152       |> Sign.add_types (map thy_type dtnvs)
   211   in
   211   in
   212     Domain_Isomorphism.domain_isomorphism (map prep spec)
   212     Domain_Isomorphism.domain_isomorphism (map prep spec)
   213   end;
   213   end;
   214 
   214 
   215 fun pcpo_arg lazy = if lazy then @{sort cpo} else @{sort pcpo};
   215 fun pcpo_arg lazy = if lazy then @{sort cpo} else @{sort pcpo};
   216 fun rep_arg lazy = @{sort rep};
   216 fun rep_arg lazy = @{sort sfp};
   217 
   217 
   218 val add_domain =
   218 val add_domain =
   219     gen_add_domain Sign.certify_typ Domain_Axioms.add_axioms pcpo_arg;
   219     gen_add_domain Sign.certify_typ Domain_Axioms.add_axioms pcpo_arg;
   220 
   220 
   221 val add_new_domain =
   221 val add_new_domain =