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

Safe HaskellNone

Agda.Compiler.Epic.Injection

Synopsis

Documentation

findInjection :: [(QName, Definition)] -> Compile TCM [(QName, Definition)]Source

Find potentially injective functions, solve constraints to fix some constructor tags and make functions whose constraints are fulfilled injections

type InjConstraints = Maybe [(QName, QName)]Source

If the pairs of constructor names have the same tags, the function is injective. If Nothing, the function is not injective.

isInjectiveSource

Arguments

:: QName

Name of the function being tested

-> [Clause]

The function's clauses

-> Compile TCM (Maybe ((QName, InjectiveFun), [(QName, QName)])) 

isInjectiveHereSource

Arguments

:: QName

Name of the function being tested

-> Int

The current argument

-> Clause 
-> Compile TCM InjConstraints 

(<:) :: Term -> Term -> (QName :-> InjectiveFun) -> Compile TCM InjConstraintsSource

Are two terms injectible? Precondition: t1 is normalised, t2 is in WHNF When reducing t2, it may become a literal, which makes this not work in some cases...

data TagEq Source

Constructors

Same Int 
IsTag Tag 

Instances

data Tags Source

Constructors

Tags 

(!!!) :: Ord k => (k :-> v) -> k -> vSource