aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Reducer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Reducer.hs')
-rw-r--r--src/Reducer.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Reducer.hs b/src/Reducer.hs
index a7c544a..2de307d 100644
--- a/src/Reducer.hs
+++ b/src/Reducer.hs
@@ -6,6 +6,9 @@ import Helper
-- TODO: Research interaction nets and optimal reduction
+-- TODO: Eta-reduction: [f 0] => f
+-- (Abstraction f@_ (Bruijn 0)) = f
+
(<+>) :: Expression -> Int -> Expression
(<+>) (Bruijn x ) n = if x > n then Bruijn (pred x) else Bruijn x
(<+>) (Application exp1 exp2) n = Application (exp1 <+> n) (exp2 <+> n)