purescript-0.15.12: PureScript Programming Language Compiler

Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.PureScript.CoreFn.Traversals

Description

CoreFn traversal helpers

Synopsis

- 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)
- 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))

# 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) #

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)) #

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.