ddc-core-simpl-0.4.1.3: Disciplined Disciple Compiler code transformations.

Safe HaskellSafe-Inferred

DDC.Core.Transform.Inline

Description

Inlining definitions into their use sites.

Synopsis

Documentation

inlineSource

Arguments

:: (Inline c, Ord n) 
=> (n -> Maybe (Exp a n))

Get the template for a named variable.

-> Set n

Don't inline definitions for these names.

-> c a n 
-> c a n 

data InlineSpec n Source

Inlining specification says what bindings we should inline from a particular module.

Constructors

InlineSpecAll

Inline all bindings from a module, but exclude some particulars.

InlineSpecNone

Inline no bindings from a module, but include some particulars.

Instances

Show n => Show (InlineSpec n) 

lookupTemplateFromModulesSource

Arguments

:: (Eq n, Ord n, Show n) 
=> Map ModuleName (InlineSpec n)

Inliner specifications for the modules.

-> [Module a n]

Modules to use for inliner templates.

-> n 
-> Maybe (Exp a n) 

Lookup an inliner template from a list of modules.