summaryrefslogtreecommitdiff
path: root/SC/Exp.hs
diff options
context:
space:
mode:
Diffstat (limited to 'SC/Exp.hs')
-rw-r--r--SC/Exp.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/SC/Exp.hs b/SC/Exp.hs
index d033cc8..2bd2b37 100644
--- a/SC/Exp.hs
+++ b/SC/Exp.hs
@@ -27,6 +27,8 @@ data CompiledFun aenv t1 t2 =
-- the given names.
-- The arguments will refer to array variable names found in the
-- original array environment.
+ [TypedAName]
+ -- ^ Arrays that the constructed arguments use from the environment
-- | The function must be single-argument. Uncurry if necessary (e.g. for zipWith).
compileFun :: AVarEnv aenv -> A.Fun aenv (t1 -> t2) -> SC (CompiledFun aenv t1 t2)
@@ -48,6 +50,7 @@ compileFun aenv (A.Lam lhs (A.Body body)) = do
map (\(TypedAName _ n) -> C.EVar n) usedA
++ itupList argexprs
++ map (\(TypedName _ n) -> C.EPtrTo (C.EVar n)) (itupList destnames))
+ usedA
where
genoutstores :: Names t -> Exprs t -> [C.Stmt]
genoutstores ITupIgnore _ = []