Fix bug in expandTypeSynonyms that could rarely cause problems
authorMax Bolingbroke <batterseapower@hotmail.com>
Thu, 10 May 2012 08:46:04 +0000 (09:46 +0100)
committerMax Bolingbroke <batterseapower@hotmail.com>
Thu, 10 May 2012 16:15:11 +0000 (17:15 +0100)
compiler/types/Type.lhs

index f81aebb..62cc7bb 100644 (file)
@@ -285,7 +285,7 @@ expandTypeSynonyms ty
       = TyConApp tc (map go tys)
     go (LitTy l)       = LitTy l
     go (TyVarTy tv)    = TyVarTy tv
-    go (AppTy t1 t2)   = AppTy (go t1) (go t2)
+    go (AppTy t1 t2)   = mkAppTy (go t1) (go t2)
     go (FunTy t1 t2)   = FunTy (go t1) (go t2)
     go (ForAllTy tv t) = ForAllTy tv (go t)
 \end{code}