minor cleanups, deleted dead code, eliminated use of (==) on CoreType
[coq-hetmet.git] / src / HaskWeakVars.v
index 8a77e09..44e267d 100644 (file)
@@ -13,12 +13,6 @@ Require Import HaskCoreVars.
 Require Import HaskCoreTypes.
 Require Import HaskWeakTypes.
 
-(* TO DO: finish this *)
-Inductive WeakCoercion : Type := weakCoercion : Kind -> WeakType -> WeakType -> CoreCoercion -> WeakCoercion.
-
-(* a WeakCoerVar just wraps a CoreVar and tags it with the pair of types amongst which it coerces *)
-Inductive WeakCoerVar := weakCoerVar : CoreVar -> Kind -> WeakType -> WeakType -> WeakCoerVar.
-
 (* a WeakExprVar just wraps a CoreVar and tags it with the type of its value *)
 Inductive WeakExprVar := weakExprVar : CoreVar -> WeakType -> WeakExprVar.
 
@@ -54,9 +48,11 @@ Definition tyConTyVars (tc:CoreTyCon) :=
   Opaque tyConTyVars.
 Definition tyConKind (tc:TyCon) : list Kind :=
   map (fun (x:WeakTypeVar) => x:Kind) (tyConTyVars tc).
-Variable tyFunResultKind : CoreTyCon -> Kind. Extract Inlined Constant tyFunResultKind => "tyFunResultKind".
+
+Variable rawTyFunKind : CoreTyCon -> Kind. Extract Inlined Constant rawTyFunKind => "(coreKindToKind . TyCon.tyConKind)".
+
 Definition tyFunKind (tc:TyFun) : ((list Kind) * Kind) :=
-  ((map (fun (x:WeakTypeVar) => x:Kind) (tyConTyVars tc)) , (tyFunResultKind tc)).
+  splitKind (rawTyFunKind tc).
 
 (*
 (* EqDecidable instances for all of the above *)