futhark-0.11.0: An optimising compiler for a functional, array-oriented language.

Safe HaskellNone
LanguageHaskell2010

Futhark.Analysis.Rephrase

Description

Facilities for changing the lore of some fragment, with no context.

Synopsis

Documentation

rephraseProg :: Monad m => Rephraser m from to -> Prog from -> m (Prog to) Source #

rephraseFunDef :: Monad m => Rephraser m from to -> FunDef from -> m (FunDef to) Source #

rephraseExp :: Monad m => Rephraser m from to -> Exp from -> m (Exp to) Source #

rephraseBody :: Monad m => Rephraser m from to -> Body from -> m (Body to) Source #

rephraseStm :: Monad m => Rephraser m from to -> Stm from -> m (Stm to) Source #

rephraseLambda :: Monad m => Rephraser m from to -> Lambda from -> m (Lambda to) Source #

rephrasePattern :: Monad m => (from -> m to) -> PatternT from -> m (PatternT to) Source #

rephrasePatElem :: Monad m => (from -> m to) -> PatElemT from -> m (PatElemT to) Source #

data Rephraser m from to Source #

Constructors

Rephraser 

Fields

castStm :: (SameScope from to, ExpAttr from ~ ExpAttr to, BodyAttr from ~ BodyAttr to, RetType from ~ RetType to, BranchType from ~ BranchType to) => Stm from -> Maybe (Stm to) Source #

Convert a binding from one lore to another, if possible.