Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data AppView = Application Expr [NamedArg Expr]
- appView :: Expr -> AppView
- maybeProjTurnPostfix :: Expr -> Maybe Expr
- unAppView :: AppView -> Expr
- data LamView = LamView [(LamInfo, LamBinding)] Expr
- lamView :: Expr -> LamView
- asView :: Pattern -> ([Name], Pattern)
- isSet :: Expr -> Bool
- unScope :: Expr -> Expr
- deepUnscope :: ExprLike a => a -> a
- deepUnscopeDecls :: [Declaration] -> [Declaration]
- deepUnscopeDecl :: Declaration -> [Declaration]
- class ExprLike a where
Documentation
appView :: Expr -> AppView Source #
Gather applications to expose head and spine.
Note: everything is an application, possibly of itself to 0 arguments
asView :: Pattern -> ([Name], Pattern) Source #
Gather top-level AsP
atterns to expose underlying pattern.
deepUnscope :: ExprLike a => a -> a Source #
Remove ScopedExpr
wrappers everywhere.
NB: Unless the implementation of ExprLike
for clauses
has been finished, this does not work for clauses yet.
deepUnscopeDecls :: [Declaration] -> [Declaration] Source #
deepUnscopeDecl :: Declaration -> [Declaration] Source #
Traversal
class ExprLike a where Source #
Apply an expression rewriting to every subexpression, inside-out. See Agda.Syntax.Internal.Generic.
recurseExpr :: Applicative m => (Expr -> m Expr -> m Expr) -> a -> m a Source #
The first expression is pre-traversal, the second one post-traversal.
recurseExpr :: (Traversable f, ExprLike a', a ~ f a', Applicative m) => (Expr -> m Expr -> m Expr) -> a -> m a Source #
The first expression is pre-traversal, the second one post-traversal.
foldExpr :: Monoid m => (Expr -> m) -> a -> m Source #
traverseExpr :: Monad m => (Expr -> m Expr) -> a -> m a Source #
ExprLike Void Source # | |
ExprLike ModuleName Source # | |
ExprLike QName Source # | |
ExprLike LHS Source # | |
ExprLike SpineLHS Source # | |
ExprLike RHS Source # | |
ExprLike TypedBinding Source # | |
ExprLike TypedBindings Source # | |
ExprLike LamBinding Source # | |
ExprLike LetBinding Source # | |
ExprLike Pragma Source # | |
ExprLike ModuleApplication Source # | |
ExprLike Declaration Source # | |
ExprLike Expr Source # | |
ExprLike a => ExprLike [a] Source # | |
ExprLike a => ExprLike (Arg a) Source # | |
ExprLike a => ExprLike (FieldAssignment' a) Source # | |
ExprLike a => ExprLike (Pattern' a) Source # | |
ExprLike a => ExprLike (LHSCore' a) Source # | |
ExprLike a => ExprLike (Clause' a) Source # | |
(ExprLike a, ExprLike b) => ExprLike (Either a b) Source # | |
(ExprLike a, ExprLike b) => ExprLike (a, b) Source # | |
ExprLike a => ExprLike (Named x a) Source # | |