purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
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 :: 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 :: 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.