diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2016-04-08 16:07:09 +0200 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2016-04-08 16:07:09 +0200 |
commit | bf51f0828b390f7ba8703bb7319d7e47bcf27910 (patch) | |
tree | 60dbcd32625baf886d0d05e48964242e4dc29e78 /prototypes | |
parent | 7912e245ab2af57eddc3152b12c07c2e287b5b21 (diff) |
Update ShiftReducer.hs
Diffstat (limited to 'prototypes')
-rw-r--r-- | prototypes/ShiftReducer.hs | 5 |
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 | -} | ||
513 | hnf :: SLExp -> SLExp | 516 | hnf :: SLExp -> SLExp |
514 | hnf exp@(Shift u (NoLet e)) = case e of | 517 | hnf 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 |