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

Agda.TypeChecking.Positivity

Description

Check that a datatype is strictly positive.

Synopsis

Documentation

checkStrictlyPositive :: MutualId -> TCM ()

Check that the datatypes in the given mutual block are strictly positive.

data OccursWhere

Description of an occurrence.

Constructors

LeftOfArrow OccursWhere 
DefArg QName Nat OccursWhere

in the nth argument of a define constant

VarArg OccursWhere

as an argument to a bound variable

MetaArg OccursWhere

as an argument of a metavariable

ConArgType QName OccursWhere

in the type of a constructor

InClause Nat OccursWhere

in the nth clause of a defined function

InDefOf QName OccursWhere

in the definition of a constant

Here 
Unknown

an unknown position (treated as negative)

data Item

Constructors

AnArg Nat 
ADef QName 

Instances

computeOccurrences :: QName -> TCM Occurrences

Compute the occurrences in a given definition.

etaExpandClause :: Nat -> Clause -> Clause

Eta expand a clause to have the given number of variables. Warning: doesn't update telescope or permutation! This is used instead of special treatment of lambdas (which was unsound: issue 121)

data Node

Constructors

DefNode QName 
ArgNode QName Nat 

data Edge

Instances

computeEdge :: Set QName -> OccursWhere -> TCM (Node, Edge)

Given an OccursWhere computes the target node and an Edge. The first argument is the set of names in the current mutual block.