purescript-0.10.4: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell98

Language.PureScript.AST.Traversals

Description

AST traversal helpers

Synopsis

Documentation

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 #

everythingWithScope :: forall r. Monoid r => (Set Ident -> Declaration -> r) -> (Set Ident -> Expr -> r) -> (Set Ident -> Binder -> r) -> (Set Ident -> CaseAlternative -> r) -> (Set Ident -> DoNotationElement -> r) -> (Set Ident -> Declaration -> r, Set Ident -> Expr -> r, Set Ident -> Binder -> r, Set Ident -> CaseAlternative -> r, Set Ident -> DoNotationElement -> r) Source #

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

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

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

Map a function over type annotations appearing inside a value