gibbon-0.3: A compiler for operating on serialized data
Safe HaskellSafe-Inferred
LanguageHaskell2010

Gibbon.L0.Specialize2

Synopsis

Documentation

bindLambdas :: Prog0 -> PassM Prog0 Source #

Let bind all anonymous lambdas.

map (x -> x + 1) [1,2,3]

becomes

let lam_1 = (x -> x + 1) in map lam_1 [1,2,3]

This is an intermediate step before the specializer turns the let bound lambdas into top-level functions.

specLambdas :: Prog0 -> PassM Prog0 Source #

Specialization, only lambdas for now. E.g.

foo :: (a -> b) -> a -> b foo f1 a = f1 a

... foo top1 x ...

becomes

foo f1 a = ...

foo2 :: a -> b foo2 a = top1 a

... foo2 x ...

desugarL0 :: Prog0 -> PassM Prog0 Source #

Desugar parallel tuples to spawn's and sync's, and printPacked into function calls.