summaryrefslogtreecommitdiff
path: root/src/CHAD.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/CHAD.hs')
-rw-r--r--src/CHAD.hs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/CHAD.hs b/src/CHAD.hs
index 786de07..4694ac4 100644
--- a/src/CHAD.hs
+++ b/src/CHAD.hs
@@ -295,18 +295,18 @@ plus = EPlus
-- STBool -> ENil ext
-- plus STAccum{} _ _ = error "Accumulators not allowed in input program"
-plusSparse :: STy a
- -> Ex env (TEither TNil a) -> Ex env (TEither TNil a)
- -> Ex (a : a : env) a
- -> Ex env (TEither TNil a)
-plusSparse t a b adder =
- ELet ext b $
- ECase ext (weakenExpr WSink a)
- (EVar ext (STEither STNil t) (IS IZ))
- (EInr ext STNil
- (ECase ext (EVar ext (STEither STNil t) (IS IZ))
- (EVar ext t (IS IZ))
- (weakenExpr (WCopy (WCopy WSink)) adder)))
+-- plusSparse :: STy a
+-- -> Ex env (TEither TNil a) -> Ex env (TEither TNil a)
+-- -> Ex (a : a : env) a
+-- -> Ex env (TEither TNil a)
+-- plusSparse t a b adder =
+-- ELet ext b $
+-- ECase ext (weakenExpr WSink a)
+-- (EVar ext (STEither STNil t) (IS IZ))
+-- (EInr ext STNil
+-- (ECase ext (EVar ext (STEither STNil t) (IS IZ))
+-- (EVar ext t (IS IZ))
+-- (weakenExpr (WCopy (WCopy WSink)) adder)))
zeroTup :: SList STy env0 -> Ex env (Tup (D2E env0))
zeroTup SNil = ENil ext