detect (->) TyCon and substitute FunTy in WeakToCore
authorAdam Megacz <megacz@cs.berkeley.edu>
Mon, 14 Mar 2011 09:08:26 +0000 (02:08 -0700)
committerAdam Megacz <megacz@cs.berkeley.edu>
Mon, 14 Mar 2011 09:08:26 +0000 (02:08 -0700)
src/HaskWeakTypes.v

index 56c2f48..6b6b61e 100644 (file)
@@ -97,6 +97,7 @@ Definition normalizeWeakType (wt:WeakType) : WeakType := wt.
 Fixpoint weakTypeToCoreType' (wt:WeakType) : CoreType :=
   match wt with
     | WTyVarTy  (weakTypeVar v _)     => TyVarTy v
+    | WAppTy (WAppTy WFunTyCon t1) t2 => FunTy (weakTypeToCoreType' t1) (weakTypeToCoreType' t2)
     | WAppTy  t1 t2                   => match (weakTypeToCoreType' t1) with
                                            | TyConApp tc tys => TyConApp tc (app tys ((weakTypeToCoreType' t2)::nil))
                                            | t1'             => AppTy t1' (weakTypeToCoreType' t2)