diff options
author | Jed Barber <jjbarber@y7mail.com> | 2012-09-28 23:54:15 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2012-09-28 23:54:15 +1000 |
commit | 102f42fa347b10190704562ae3638f5683772211 (patch) | |
tree | 856e70d4b54fe4d3df490026042671561137c633 /Library/TypeVar.hs | |
parent | ec2487e62240dcc3b98a9a3f7c017574af34be2a (diff) |
Types only tracked in alpha equivalence for bound variables
Diffstat (limited to 'Library/TypeVar.hs')
-rw-r--r-- | Library/TypeVar.hs | 13 |
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) |