purescript-ast-0.1.1.0: PureScript Programming Language Abstract Syntax Tree
Safe HaskellNone
LanguageHaskell2010

Language.PureScript.AST.Traversals

Description

AST traversal helpers

Synopsis

Documentation

litM :: Monad m => (a -> m a) -> Literal a -> m (Literal a) Source #

everywhereOnValuesTopDownM :: forall m. Monad m => (Declaration -> m Declaration) -> (Expr -> m Expr) -> (Binder -> m Binder) -> (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder) Source #

everywhereOnValuesM :: forall m. Monad m => (Declaration -> m Declaration) -> (Expr -> m Expr) -> (Binder -> m Binder) -> (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder) Source #

everythingOnValues :: forall r. (r -> r -> r) -> (Declaration -> r) -> (Expr -> r) -> (Binder -> r) -> (CaseAlternative -> r) -> (DoNotationElement -> r) -> (Declaration -> r, Expr -> r, Binder -> r, CaseAlternative -> r, DoNotationElement -> r) Source #

everythingWithContextOnValues :: forall s r. s -> r -> (r -> r -> r) -> (s -> Declaration -> (s, r)) -> (s -> Expr -> (s, r)) -> (s -> Binder -> (s, r)) -> (s -> CaseAlternative -> (s, r)) -> (s -> DoNotationElement -> (s, r)) -> (Declaration -> r, Expr -> r, Binder -> r, CaseAlternative -> r, DoNotationElement -> r) Source #

everywhereWithContextOnValuesM :: forall m s. Monad m => s -> (s -> Declaration -> m (s, Declaration)) -> (s -> Expr -> m (s, Expr)) -> (s -> Binder -> m (s, Binder)) -> (s -> CaseAlternative -> m (s, CaseAlternative)) -> (s -> DoNotationElement -> m (s, DoNotationElement)) -> (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder, CaseAlternative -> m CaseAlternative, DoNotationElement -> m DoNotationElement) Source #

accumTypes :: Monoid r => (SourceType -> r) -> (Declaration -> r, Expr -> r, Binder -> r, CaseAlternative -> r, DoNotationElement -> r) Source #

overTypes :: (SourceType -> SourceType) -> Expr -> Expr Source #

Map a function over type annotations appearing inside a value