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

Safe HaskellNone

Agda.Syntax.Abstract.Views

Contents

Synopsis

Documentation

appView :: Expr -> AppViewSource

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

Check whether we are dealing with a universe.

unScope :: Expr -> ExprSource

Remove top ScopedExpr wrappers.

deepUnScope :: Expr -> ExprSource

Remove ScopedExpr wrappers everywhere.

Traversal

class ExprLike a whereSource

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

Methods

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

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

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.