src/HOLCF/Tools/Domain/domain_library.ML
changeset 35519 abf45a91d24d
parent 35497 979706bd5c16
child 35521 47eec4da124a
--- a/src/HOLCF/Tools/Domain/domain_library.ML	Tue Mar 02 14:59:24 2010 -0800
+++ b/src/HOLCF/Tools/Domain/domain_library.ML	Tue Mar 02 15:06:02 2010 -0800
@@ -95,11 +95,10 @@
       eqtype arg;
   type cons = string * mixfix * arg list;
   type eq = (string * typ list) * cons list;
-  val mk_arg : (bool * Datatype.dtyp) * string option * string -> arg;
+  val mk_arg : (bool * Datatype.dtyp) * string -> arg;
   val is_lazy : arg -> bool;
   val rec_of : arg -> int;
   val dtyp_of : arg -> Datatype.dtyp;
-  val sel_of : arg -> string option;
   val vname : arg -> string;
   val upd_vname : (string -> string) -> arg -> arg;
   val is_rec : arg -> bool;
@@ -186,7 +185,6 @@
 
 type arg =
      (bool * Datatype.dtyp) *   (*  (lazy, recursive element) *)
-     string option *               (*   selector name    *)
      string;                       (*   argument name    *)
 
 type cons =
@@ -201,15 +199,14 @@
 
 val mk_arg = I;
 
-fun rec_of ((_,dtyp),_,_) =
+fun rec_of ((_,dtyp),_) =
     case dtyp of Datatype_Aux.DtRec i => i | _ => ~1;
 (* FIXME: what about indirect recursion? *)
 
-fun is_lazy arg = fst (first arg);
-fun dtyp_of arg = snd (first arg);
-val sel_of    =       second;
-val     vname =       third;
-val upd_vname =   upd_third;
+fun is_lazy arg = fst (fst arg);
+fun dtyp_of arg = snd (fst arg);
+val     vname =       snd;
+val upd_vname =   apsnd;
 fun is_rec         arg = rec_of arg >=0;
 fun is_nonlazy_rec arg = is_rec arg andalso not (is_lazy arg);
 fun nonlazy     args   = map vname (filter_out is_lazy args);
@@ -229,7 +226,7 @@
 fun big_sprodD ds = case ds of [] => oneD | _ => foldr1 mk_sprodD ds;
 fun big_ssumD ds = case ds of [] => unitD | _ => foldr1 mk_ssumD ds;
 
-fun dtyp_of_arg ((lazy, D), _, _) = if lazy then mk_uD D else D;
+fun dtyp_of_arg ((lazy, D), _) = if lazy then mk_uD D else D;
 fun dtyp_of_cons (_, _, args) = big_sprodD (map dtyp_of_arg args);
 fun dtyp_of_eq (_, cons) = big_ssumD (map dtyp_of_cons cons);