src/HOLCF/Tools/Domain/domain_syntax.ML
author huffman
Sun, 28 Feb 2010 08:55:01 -0800
changeset 35468 09bc6a2e2296
parent 35462 f5461b02d754
child 35471 94bb9f59d4e9
permissions -rw-r--r--
move definition and syntax of pattern combinators into domain_constructors.ML
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32126
a5042f260440 obey captialized directory names convention
haftmann
parents: 31288
diff changeset
     1
(*  Title:      HOLCF/Tools/Domain/domain_syntax.ML
23152
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
     2
    Author:     David von Oheimb
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
     3
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
     4
Syntax generator for domain command.
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
     5
*)
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
     6
30919
dcf8a7a66bd1 make domain package ML interface more consistent with datatype package; use binding instead of bstring
huffman
parents: 30912
diff changeset
     7
signature DOMAIN_SYNTAX =
dcf8a7a66bd1 make domain package ML interface more consistent with datatype package; use binding instead of bstring
huffman
parents: 30912
diff changeset
     8
sig
31288
67dff9c5b2bd remove hard tabs, fix indentation
huffman
parents: 31226
diff changeset
     9
  val calc_syntax:
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    10
      theory ->
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    11
      bool ->
31288
67dff9c5b2bd remove hard tabs, fix indentation
huffman
parents: 31226
diff changeset
    12
      typ ->
67dff9c5b2bd remove hard tabs, fix indentation
huffman
parents: 31226
diff changeset
    13
      (string * typ list) *
67dff9c5b2bd remove hard tabs, fix indentation
huffman
parents: 31226
diff changeset
    14
      (binding * (bool * binding option * typ) list * mixfix) list ->
67dff9c5b2bd remove hard tabs, fix indentation
huffman
parents: 31226
diff changeset
    15
      (binding * typ * mixfix) list * ast Syntax.trrule list
31226
1dffa9a056b5 indentation; export Domain_Syntax.calc_syntax
huffman
parents: 31023
diff changeset
    16
31288
67dff9c5b2bd remove hard tabs, fix indentation
huffman
parents: 31226
diff changeset
    17
  val add_syntax:
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    18
      bool ->
31288
67dff9c5b2bd remove hard tabs, fix indentation
huffman
parents: 31226
diff changeset
    19
      string ->
67dff9c5b2bd remove hard tabs, fix indentation
huffman
parents: 31226
diff changeset
    20
      ((string * typ list) *
67dff9c5b2bd remove hard tabs, fix indentation
huffman
parents: 31226
diff changeset
    21
       (binding * (bool * binding option * typ) list * mixfix) list) list ->
67dff9c5b2bd remove hard tabs, fix indentation
huffman
parents: 31226
diff changeset
    22
      theory -> theory
30919
dcf8a7a66bd1 make domain package ML interface more consistent with datatype package; use binding instead of bstring
huffman
parents: 30912
diff changeset
    23
end;
dcf8a7a66bd1 make domain package ML interface more consistent with datatype package; use binding instead of bstring
huffman
parents: 30912
diff changeset
    24
dcf8a7a66bd1 make domain package ML interface more consistent with datatype package; use binding instead of bstring
huffman
parents: 30912
diff changeset
    25
31023
d027411c9a38 use opaque ascription for all HOLCF code
huffman
parents: 30919
diff changeset
    26
structure Domain_Syntax :> DOMAIN_SYNTAX =
31226
1dffa9a056b5 indentation; export Domain_Syntax.calc_syntax
huffman
parents: 31023
diff changeset
    27
struct
23152
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
    28
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
    29
open Domain_Library;
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
    30
infixr 5 -->; infixr 6 ->>;
31226
1dffa9a056b5 indentation; export Domain_Syntax.calc_syntax
huffman
parents: 31023
diff changeset
    31
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    32
fun calc_syntax thy
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    33
    (definitional : bool)
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    34
    (dtypeprod : typ)
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    35
    ((dname : string, typevars : typ list), 
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    36
     (cons': (binding * (bool * binding option * typ) list * mixfix) list))
31226
1dffa9a056b5 indentation; export Domain_Syntax.calc_syntax
huffman
parents: 31023
diff changeset
    37
    : (binding * typ * mixfix) list * ast Syntax.trrule list =
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    38
  let
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    39
(* ----- constants concerning the isomorphism ------------------------------- *)
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    40
    local
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    41
      fun opt_lazy (lazy,_,t) = if lazy then mk_uT t else t
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    42
      fun prod     (_,args,_) = case args of [] => oneT
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    43
                                           | _ => foldr1 mk_sprodT (map opt_lazy args);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    44
      fun freetvar s = let val tvar = mk_TFree s in
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    45
                         if tvar mem typevars then freetvar ("t"^s) else tvar end;
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    46
      fun when_type (_,args,_) = List.foldr (op ->>) (freetvar "t") (map third args);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    47
    in
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    48
    val dtype  = Type(dname,typevars);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    49
    val dtype2 = foldr1 mk_ssumT (map prod cons');
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    50
    val dnam = Long_Name.base_name dname;
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    51
    fun dbind s = Binding.name (dnam ^ s);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    52
    val const_rep  = (dbind "_rep" ,              dtype  ->> dtype2, NoSyn);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    53
    val const_abs  = (dbind "_abs" ,              dtype2 ->> dtype , NoSyn);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    54
    val const_when = (dbind "_when", List.foldr (op ->>) (dtype ->> freetvar "t") (map when_type cons'), NoSyn);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    55
    val const_copy = (dbind "_copy", dtypeprod ->> dtype  ->> dtype , NoSyn);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    56
    end;
23152
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
    57
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    58
(* ----- constants concerning induction ------------------------------------- *)
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    59
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    60
    val const_take   = (dbind "_take"  , HOLogic.natT-->dtype->>dtype, NoSyn);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    61
    val const_finite = (dbind "_finite", dtype-->HOLogic.boolT       , NoSyn);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    62
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    63
(* ----- case translation --------------------------------------------------- *)
23152
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
    64
35262
9ea4445d2ccf slightly more abstract syntax mark/unmark operations;
wenzelm
parents: 35258
diff changeset
    65
    fun syntax b = Syntax.mark_const (Sign.full_bname thy b);
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    66
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    67
    local open Syntax in
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    68
    local
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    69
      fun c_ast authentic con = Constant ((authentic ? syntax) (Binding.name_of con));
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    70
      fun expvar n = Variable ("e" ^ string_of_int n);
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    71
      fun argvar n m _ = Variable ("a" ^ string_of_int n ^ "_" ^ string_of_int m);
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    72
      fun argvars n args = mapn (argvar n) 1 args;
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    73
      fun app s (l, r) = mk_appl (Constant s) [l, r];
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    74
      val cabs = app "_cabs";
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    75
      val capp = app @{const_syntax Rep_CFun};
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    76
      fun con1 authentic n (con,args,mx) =
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    77
        Library.foldl capp (c_ast authentic con, argvars n args);
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    78
      fun case1 authentic n (con,args,mx) =
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    79
        app "_case1" (con1 authentic n (con,args,mx), expvar n);
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    80
      fun arg1 n (con,args,_) = List.foldr cabs (expvar n) (argvars n args);
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    81
      fun when1 n m = if n = m then arg1 n else K (Constant @{const_syntax UU});
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    82
          
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    83
      fun app_var x = mk_appl (Constant "_variable") [x, Variable "rhs"];
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    84
      fun app_pat x = mk_appl (Constant "_pat") [x];
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    85
      fun args_list [] = Constant "_noargs"
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    86
        | args_list xs = foldr1 (app "_args") xs;
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    87
    in
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    88
    fun case_trans authentic =
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    89
        ParsePrintRule
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    90
          (app "_case_syntax" (Variable "x", foldr1 (app "_case2") (mapn (case1 authentic) 1 cons')),
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    91
           capp (Library.foldl capp
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    92
            (Constant (syntax (dnam ^ "_when")), mapn arg1 1 cons'), Variable "x"));
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
    93
        
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    94
    fun one_abscon_trans authentic n (con,mx,args) =
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    95
        ParsePrintRule
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    96
          (cabs (con1 authentic n (con,mx,args), expvar n),
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    97
           Library.foldl capp (Constant (syntax (dnam ^ "_when")), mapn (when1 n) 1 cons'));
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    98
    fun abscon_trans authentic = mapn (one_abscon_trans authentic) 1 cons';
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
    99
        
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
   100
    fun one_case_trans authentic (con,args,mx) =
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   101
      let
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
   102
        val cname = c_ast authentic con;
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
   103
        val pname = Constant (syntax (strip_esc (Binding.name_of con) ^ "_pat"));
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   104
        val ns = 1 upto length args;
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   105
        val xs = map (fn n => Variable ("x"^(string_of_int n))) ns;
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   106
        val ps = map (fn n => Variable ("p"^(string_of_int n))) ns;
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   107
        val vs = map (fn n => Variable ("v"^(string_of_int n))) ns;
31288
67dff9c5b2bd remove hard tabs, fix indentation
huffman
parents: 31226
diff changeset
   108
      in
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   109
        [ParseRule (app_pat (Library.foldl capp (cname, xs)),
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   110
                    mk_appl pname (map app_pat xs)),
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   111
         ParseRule (app_var (Library.foldl capp (cname, xs)),
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   112
                    app_var (args_list xs)),
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   113
         PrintRule (Library.foldl capp (cname, ListPair.map (app "_match") (ps,vs)),
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   114
                    app "_match" (mk_appl pname ps, args_list vs))]
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   115
        end;
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
   116
    val Case_trans = maps (one_case_trans false) cons' @ maps (one_case_trans true) cons';
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   117
    end;
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   118
    end;
33802
48ce3a1063f2 domain_isomorphism package defines copy functions
huffman
parents: 33798
diff changeset
   119
    val optional_consts =
48ce3a1063f2 domain_isomorphism package defines copy functions
huffman
parents: 33798
diff changeset
   120
        if definitional then [] else [const_rep, const_abs, const_copy];
23152
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
   121
33802
48ce3a1063f2 domain_isomorphism package defines copy functions
huffman
parents: 33798
diff changeset
   122
  in (optional_consts @ [const_when] @ 
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   123
      [const_take, const_finite],
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
   124
      (case_trans false :: case_trans true :: (abscon_trans false @ abscon_trans true @ Case_trans)))
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   125
  end; (* let *)
23152
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
   126
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
   127
(* ----- putting all the syntax stuff together ------------------------------ *)
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
   128
31226
1dffa9a056b5 indentation; export Domain_Syntax.calc_syntax
huffman
parents: 31023
diff changeset
   129
fun add_syntax
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   130
    (definitional : bool)
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   131
    (comp_dnam : string)
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   132
    (eqs' : ((string * typ list) *
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   133
             (binding * (bool * binding option * typ) list * mixfix) list) list)
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   134
    (thy'' : theory) =
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   135
  let
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   136
    val dtypes  = map (Type o fst) eqs';
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   137
    val boolT   = HOLogic.boolT;
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   138
    val funprod =
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   139
        foldr1 HOLogic.mk_prodT (map (fn tp => tp ->> tp          ) dtypes);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   140
    val relprod =
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   141
        foldr1 HOLogic.mk_prodT (map (fn tp => tp --> tp --> boolT) dtypes);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   142
    val const_copy =
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   143
        (Binding.name (comp_dnam^"_copy"), funprod ->> funprod, NoSyn);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   144
    val const_bisim =
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   145
        (Binding.name (comp_dnam^"_bisim"), relprod --> boolT, NoSyn);
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   146
    val ctt : ((binding * typ * mixfix) list * ast Syntax.trrule list) list =
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
   147
        map (calc_syntax thy'' definitional funprod) eqs';
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   148
  in thy''
35258
8154c5211ddb adapted to authentic syntax;
wenzelm
parents: 35129
diff changeset
   149
       |> Cont_Consts.add_consts
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   150
           (maps fst ctt @ 
33807
ce8d2e8bca21 domain_isomorphism package defines combined copy function
huffman
parents: 33802
diff changeset
   151
            (if length eqs'>1 andalso not definitional
ce8d2e8bca21 domain_isomorphism package defines combined copy function
huffman
parents: 33802
diff changeset
   152
             then [const_copy] else []) @
33798
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   153
            [const_bisim])
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   154
       |> Sign.add_trrules_i (maps snd ctt)
46cbbcbd4e68 clean up indentation; add 'definitional' option flag
huffman
parents: 33004
diff changeset
   155
  end; (* let *)
23152
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
   156
9497234a2743 moved HOLCF tools to canonical place;
wenzelm
parents:
diff changeset
   157
end; (* struct *)