Safe Haskell | None |
---|---|
Language | Haskell2010 |
AST traversal helpers
Synopsis
- guardedExprM :: Applicative m => (Guard -> m Guard) -> (Expr -> m Expr) -> GuardedExpr -> m GuardedExpr
- mapGuardedExpr :: (Guard -> Guard) -> (Expr -> Expr) -> GuardedExpr -> GuardedExpr
- litM :: Monad m => (a -> m a) -> Literal a -> m (Literal a)
- everywhereOnValues :: (Declaration -> Declaration) -> (Expr -> Expr) -> (Binder -> Binder) -> (Declaration -> Declaration, Expr -> Expr, Binder -> Binder)
- everywhereOnValuesTopDownM :: forall m. Monad m => (Declaration -> m Declaration) -> (Expr -> m Expr) -> (Binder -> m Binder) -> (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder)
- everywhereOnValuesM :: forall m. Monad m => (Declaration -> m Declaration) -> (Expr -> m Expr) -> (Binder -> m Binder) -> (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder)
- 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)
- 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)
- 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)
- data ScopedIdent
- inScope :: Ident -> Set ScopedIdent -> Bool
- everythingWithScope :: forall r. Monoid r => (Set ScopedIdent -> Declaration -> r) -> (Set ScopedIdent -> Expr -> r) -> (Set ScopedIdent -> Binder -> r) -> (Set ScopedIdent -> CaseAlternative -> r) -> (Set ScopedIdent -> DoNotationElement -> r) -> (Set ScopedIdent -> Declaration -> r, Set ScopedIdent -> Expr -> r, Set ScopedIdent -> Binder -> r, Set ScopedIdent -> CaseAlternative -> r, Set ScopedIdent -> DoNotationElement -> r)
- accumTypes :: Monoid r => (SourceType -> r) -> (Declaration -> r, Expr -> r, Binder -> r, CaseAlternative -> r, DoNotationElement -> r)
- overTypes :: (SourceType -> SourceType) -> Expr -> Expr
Documentation
guardedExprM :: Applicative m => (Guard -> m Guard) -> (Expr -> m Expr) -> GuardedExpr -> m GuardedExpr Source #
mapGuardedExpr :: (Guard -> Guard) -> (Expr -> Expr) -> GuardedExpr -> GuardedExpr Source #
everywhereOnValues :: (Declaration -> Declaration) -> (Expr -> Expr) -> (Binder -> Binder) -> (Declaration -> Declaration, Expr -> Expr, Binder -> Binder) 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 #
data ScopedIdent Source #
Instances
Eq ScopedIdent Source # | |
Defined in Language.PureScript.AST.Traversals (==) :: ScopedIdent -> ScopedIdent -> Bool # (/=) :: ScopedIdent -> ScopedIdent -> Bool # | |
Ord ScopedIdent Source # | |
Defined in Language.PureScript.AST.Traversals compare :: ScopedIdent -> ScopedIdent -> Ordering # (<) :: ScopedIdent -> ScopedIdent -> Bool # (<=) :: ScopedIdent -> ScopedIdent -> Bool # (>) :: ScopedIdent -> ScopedIdent -> Bool # (>=) :: ScopedIdent -> ScopedIdent -> Bool # max :: ScopedIdent -> ScopedIdent -> ScopedIdent # min :: ScopedIdent -> ScopedIdent -> ScopedIdent # | |
Show ScopedIdent Source # | |
Defined in Language.PureScript.AST.Traversals showsPrec :: Int -> ScopedIdent -> ShowS # show :: ScopedIdent -> String # showList :: [ScopedIdent] -> ShowS # |
everythingWithScope :: forall r. Monoid r => (Set ScopedIdent -> Declaration -> r) -> (Set ScopedIdent -> Expr -> r) -> (Set ScopedIdent -> Binder -> r) -> (Set ScopedIdent -> CaseAlternative -> r) -> (Set ScopedIdent -> DoNotationElement -> r) -> (Set ScopedIdent -> Declaration -> r, Set ScopedIdent -> Expr -> r, Set ScopedIdent -> Binder -> r, Set ScopedIdent -> CaseAlternative -> r, Set ScopedIdent -> DoNotationElement -> r) 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