Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- mapIdent :: (Ident -> JExpr) -> (JExpr -> JExpr, JStat -> JStat)
- mapStatIdent :: (Ident -> JExpr) -> JStat -> JStat
- mapExprIdent :: (Ident -> JExpr) -> JExpr -> JExpr
- identsS :: JStat -> [Ident]
- identsV :: JVal -> [Ident]
- identsE :: JExpr -> [Ident]
- jsSaturate :: JMacro a => Maybe FastString -> a -> a
- class JMacro a where
- data JMGadt a where
- class Compos t where
- compos :: (forall a. a -> m a) -> (forall a b. m (a -> b) -> m a -> m b) -> (forall a. t a -> m (t a)) -> t c -> m (t c)
- composOp :: Compos t => (forall a. t a -> t a) -> t b -> t b
- composOpM :: (Compos t, Monad m) => (forall a. t a -> m (t a)) -> t b -> m (t b)
- composOpM_ :: (Compos t, Monad m) => (forall a. t a -> m ()) -> t b -> m ()
- composOpFold :: Compos t => b -> (b -> b -> b) -> (forall a. t a -> b) -> t c -> b
Documentation
mapIdent :: (Ident -> JExpr) -> (JExpr -> JExpr, JStat -> JStat) Source #
Map on every variable ident
Saturation
jsSaturate :: JMacro a => Maybe FastString -> a -> a Source #
Given an optional prefix, fills in all free variable names with a supply of names generated by the prefix.
Generic traversal (via compos)
Compos and ops for generic traversal as defined over the JMacro ADT.
Utility class to coerce the ADT into a regular structure.
Union type to allow regular traversal by compos.
composOpM_ :: (Compos t, Monad m) => (forall a. t a -> m ()) -> t b -> m () Source #
composOpFold :: Compos t => b -> (b -> b -> b) -> (forall a. t a -> b) -> t c -> b Source #