Agda-2.4.0.2: A dependently typed functional programming language and proof assistant

Safe HaskellNone
LanguageHaskell98

Agda.Syntax.Abstract.Views

Contents

Synopsis

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 AsPatterns to expose underlying pattern.

isSet :: Expr -> Bool Source

Check whether we are dealing with a universe.

unScope :: Expr -> Expr Source

Remove top ScopedExpr wrappers.

deepUnScope :: Expr -> Expr Source

Remove ScopedExpr wrappers everywhere.

Traversal

class ExprLike a where Source

Apply an expression rewriting to every subexpression, inside-out. See Generic

Minimal complete definition

traverseExpr

Methods

traverseExpr :: (Monad m, Applicative m) => (Expr -> m Expr) -> a -> m a Source

mapExpr :: (Expr -> Expr) -> a -> a Source

Instances

ExprLike TypedBinding 
ExprLike TypedBindings 
ExprLike LamBinding 
ExprLike LetBinding 
ExprLike Expr 
ExprLike a => ExprLike [a] 
ExprLike (Pattern' a)

TODO: currently does not go into patterns.

ExprLike (Clause' a)

TODO: currently does not go into clauses.

ExprLike a => ExprLike (x, a) 
ExprLike a => ExprLike (Named x a) 
ExprLike a => ExprLike (Arg c a)

TODO: currently does not go into colors.