summaryrefslogtreecommitdiff
path: root/prototypes
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2016-04-08 16:07:09 +0200
committerCsaba Hruska <csaba.hruska@gmail.com>2016-04-08 16:07:09 +0200
commitbf51f0828b390f7ba8703bb7319d7e47bcf27910 (patch)
tree60dbcd32625baf886d0d05e48964242e4dc29e78 /prototypes
parent7912e245ab2af57eddc3152b12c07c2e287b5b21 (diff)
Update ShiftReducer.hs
Diffstat (limited to 'prototypes')
-rw-r--r--prototypes/ShiftReducer.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/prototypes/ShiftReducer.hs b/prototypes/ShiftReducer.hs
index 47261d65..d9176c6f 100644
--- a/prototypes/ShiftReducer.hs
+++ b/prototypes/ShiftReducer.hs
@@ -509,7 +509,10 @@ pushLet' (Shift u l) = case l of
509 509
510--------------------------------------------------------- 510---------------------------------------------------------
511-} 511-}
512 512{-
513 TODO: add work only for normal form literals on expressions without lets
514 NEXT: this should work: add (add 1 1) (add 2 2)
515-}
513hnf :: SLExp -> SLExp 516hnf :: SLExp -> SLExp
514hnf exp@(Shift u (NoLet e)) = case e of 517hnf exp@(Shift u (NoLet e)) = case e of
515 EApp (Shift u' (EApp (Shift _ (Delta "add")) y)) x -> case hnf $ NoLet <$> y of 518 EApp (Shift u' (EApp (Shift _ (Delta "add")) y)) x -> case hnf $ NoLet <$> y of