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

Safe HaskellNone
LanguageHaskell2010

Agda.Interaction.BasicOps

Contents

Synopsis

Documentation

parseExpr :: Range -> String -> TCM Expr #

Parses an expression.

redoChecks :: Maybe InteractionId -> TCM () #

After a give, redo termination etc. checks for function which was complemented.

give #

Arguments

:: UseForce

Skip safety checks?

-> InteractionId

Hole.

-> Maybe Range 
-> Expr

The expression to give.

-> TCM Expr

If successful, the very expression is returned unchanged.

Try to fill hole by expression.

Returns the given expression unchanged (for convenient generalization to refine).

refine #

Arguments

:: UseForce

Skip safety checks when giving?

-> InteractionId

Hole.

-> Maybe Range 
-> Expr

The expression to refine the hole with.

-> TCM Expr

The successfully given expression.

Try to refine hole by expression e.

This amounts to successively try to give e, e ?, e ? ?, ... Returns the successfully given expression.

evalInCurrent :: Expr -> TCM Expr #

Evaluate the given expression in the current environment

data Rewrite #

Modifier for interactive commands, specifying the amount of normalization in the output.

normalForm :: (Reduce t, Simplify t, Normalise t) => Rewrite -> t -> TCM t #

data ComputeMode #

Modifier for the interactive computation command, specifying the mode of computation and result display.

data UseForce #

Modifier for interactive commands, specifying whether safety checks should be ignored.

Constructors

WithForce

Ignore additional checks, like termination/positivity...

WithoutForce

Don't ignore any checks.

data OutputForm a b #

Instances
Reify ProblemConstraint (Closure (OutputForm Expr Expr)) # 
Instance details

Defined in Agda.Interaction.BasicOps

Functor (OutputForm a) # 
Instance details

Defined in Agda.Interaction.BasicOps

Methods

fmap :: (a0 -> b) -> OutputForm a a0 -> OutputForm a b #

(<$) :: a0 -> OutputForm a b -> OutputForm a a0 #

(Show a, Show b) => Show (OutputForm a b) # 
Instance details

Defined in Agda.Interaction.BasicOps

Methods

showsPrec :: Int -> OutputForm a b -> ShowS #

show :: OutputForm a b -> String #

showList :: [OutputForm a b] -> ShowS #

(ToConcrete a c, ToConcrete b d) => ToConcrete (OutputForm a b) (OutputForm c d) # 
Instance details

Defined in Agda.Interaction.BasicOps

Methods

toConcrete :: OutputForm a b -> AbsToCon (OutputForm c d) #

bindToConcrete :: OutputForm a b -> (OutputForm c d -> AbsToCon b0) -> AbsToCon b0 #

data OutputConstraint' a b #

A subset of OutputConstraint.

Constructors

OfType' 

Fields

getSolvedInteractionPoints :: Bool -> Rewrite -> TCM [(InteractionId, MetaId, Expr)] #

getSolvedInteractionPoints True returns all solutions, even if just solved by another, non-interaction meta.

getSolvedInteractionPoints False only returns metas that are solved by a non-meta.

typeInCurrent :: Rewrite -> Expr -> TCM Expr #

Returns the type of the expression in the current environment We wake up irrelevant variables just in case the user want to invoke that command in an irrelevant context.

withMetaId :: MetaId -> TCM a -> TCM a #

atTopLevel :: TCM a -> TCM a #

Runs the given computation as if in an anonymous goal at the end of the top-level module.

Sets up current module, scope, and context.

parseName :: Range -> String -> TCM QName #

Parse a name.

isQName :: Expr -> Maybe QName #

Check whether an expression is a (qualified) identifier.

moduleContents #

Arguments

:: Rewrite

How should the types be presented?

-> Range

The range of the next argument.

-> String

The module name.

-> TCM ([Name], [(Name, Type)])

Module names, names paired up with corresponding types.

Returns the contents of the given module or record.

getRecordContents #

Arguments

:: Rewrite

Amount of normalization in types.

-> Expr

Expression presumably of record type.

-> TCM ([Name], [(Name, Type)])

Module names, names paired up with corresponding types.

Returns the contents of the given record identifier.

getModuleContents #

Arguments

:: Rewrite

Amount of normalization in types.

-> QName

Module name.

-> TCM ([Name], [(Name, Type)])

Module names, names paired up with corresponding types.

Returns the contents of the given module.

Orphan instances