Safe Haskell  SafeInferred 

Language  Haskell2010 
Facilities for changing the lore of some fragment, with no context. We call this "rephrasing", for no deep reason.
Synopsis
 rephraseProg :: Monad m => Rephraser m from to > Prog from > m (Prog to)
 rephraseFunDef :: Monad m => Rephraser m from to > FunDef from > m (FunDef to)
 rephraseExp :: Monad m => Rephraser m from to > Exp from > m (Exp to)
 rephraseBody :: Monad m => Rephraser m from to > Body from > m (Body to)
 rephraseStm :: Monad m => Rephraser m from to > Stm from > m (Stm to)
 rephraseLambda :: Monad m => Rephraser m from to > Lambda from > m (Lambda to)
 rephrasePattern :: Monad m => (from > m to) > PatternT from > m (PatternT to)
 rephrasePatElem :: Monad m => (from > m to) > PatElemT from > m (PatElemT to)
 data Rephraser m from to = Rephraser {
 rephraseExpLore :: ExpDec from > m (ExpDec to)
 rephraseLetBoundLore :: LetDec from > m (LetDec to)
 rephraseFParamLore :: FParamInfo from > m (FParamInfo to)
 rephraseLParamLore :: LParamInfo from > m (LParamInfo to)
 rephraseBodyLore :: BodyDec from > m (BodyDec to)
 rephraseRetType :: RetType from > m (RetType to)
 rephraseBranchType :: BranchType from > m (BranchType to)
 rephraseOp :: Op from > m (Op to)
Documentation
rephraseProg :: Monad m => Rephraser m from to > Prog from > m (Prog to) Source #
Rephrase an entire program.
rephraseFunDef :: Monad m => Rephraser m from to > FunDef from > m (FunDef to) Source #
Rephrase a function definition.
rephraseExp :: Monad m => Rephraser m from to > Exp from > m (Exp to) Source #
Rephrase an expression.
rephraseStm :: Monad m => Rephraser m from to > Stm from > m (Stm to) Source #
Rephrase a statement.
rephraseLambda :: Monad m => Rephraser m from to > Lambda from > m (Lambda to) Source #
Rephrase a lambda.
rephrasePattern :: Monad m => (from > m to) > PatternT from > m (PatternT to) Source #
Rephrase a pattern.
rephrasePatElem :: Monad m => (from > m to) > PatElemT from > m (PatElemT to) Source #
Rephrase a pattern element.
data Rephraser m from to Source #
A collection of functions that together allow us to rephrase some
IR fragment, in some monad m
. If we let m
be the Maybe
monad, we can conveniently do rephrasing that might fail. This is
useful if you want to see if some IR in e.g. the Kernels
lore
actually uses any Kernels
specific operations.
Rephraser  
