purescript-0.15.6: PureScript Programming Language Compiler
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.PureScript.CoreFn.Traversals

Description

CoreFn traversal helpers

Synopsis

Documentation

everywhereOnValues :: (Bind a -> Bind a) -> (Expr a -> Expr a) -> (Binder a -> Binder a) -> (Bind a -> Bind a, Expr a -> Expr a, Binder a -> Binder a) Source #

traverseCoreFn :: forall f a. Applicative f => (Bind a -> f (Bind a)) -> (Expr a -> f (Expr a)) -> (Binder a -> f (Binder a)) -> (CaseAlternative a -> f (CaseAlternative a)) -> (Bind a -> f (Bind a), Expr a -> f (Expr a), Binder a -> f (Binder a), CaseAlternative a -> f (CaseAlternative a)) Source #

Apply the provided functions to the top level of AST nodes.

This function is useful as a building block for recursive functions, but doesn't actually recurse itself.