summaryrefslogtreecommitdiff
path: root/Library/TypeVar.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Library/TypeVar.hs')
-rw-r--r--Library/TypeVar.hs13
1 files changed, 1 insertions, 12 deletions
diff --git a/Library/TypeVar.hs b/Library/TypeVar.hs
index e8ce972..078d5d3 100644
--- a/Library/TypeVar.hs
+++ b/Library/TypeVar.hs
@@ -34,7 +34,7 @@ data TypeOp = TypeOp { tyOp :: Name } deriving (Eq, Ord)
data Type = TypeVar { typeVar :: Name }
| AType { aType :: [Type]
- , aTypeOp :: TypeOp } deriving (Ord)
+ , aTypeOp :: TypeOp } deriving (Eq, Ord)
data Const = Const { constName :: Name } deriving (Eq, Ord)
@@ -60,17 +60,6 @@ instance Show Var where
show (Var a _) = show a
-instance Eq Type where
- a == b = a `typeAlphaEquiv` b
-
-
-
-typeAlphaEquiv :: Type -> Type -> Bool
-typeAlphaEquiv (TypeVar a) (TypeVar b) = True
-typeAlphaEquiv (AType alist aop) (AType blist bop) =
- aop == bop && all (\(x,y) -> x == y) (zip alist blist)
-typeAlphaEquiv _ _ = True
-
mkEqualsType :: Type -> Type
mkEqualsType ty = typeFunc ty (typeFunc ty typeBool)