diff options
Diffstat (limited to 'Term.hs')
-rw-r--r-- | Term.hs | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,8 @@ module Term ( Term(..), + Substitution, + + nullTerm, alphaEquiv, alphaConvert, @@ -31,7 +34,8 @@ data Term = TVar { tVar :: Var } | TApp { tAppLeft :: Term , tAppRight :: Term } | TAbs { tAbsVar :: Term - , tAbsTerm :: Term } deriving (Ord) + , tAbsTerm :: Term } + | TNull deriving (Ord) type Substitution = ( [(Name,Type)], [(Var,Term)] ) @@ -50,6 +54,10 @@ instance Eq Term where +nullTerm :: Term +nullTerm = TNull + + alphaEquiv :: Term -> Term -> Bool alphaEquiv a b = let equiv = \term1 term2 varmap1 varmap2 depth -> |