summaryrefslogtreecommitdiff
path: root/Term.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Term.hs')
-rw-r--r--Term.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Term.hs b/Term.hs
index 20c70ce..23fc5c5 100644
--- a/Term.hs
+++ b/Term.hs
@@ -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 ->