language-pts-0: Pure Type Systems

Safe HaskellNone
LanguageHaskell2010

Language.PTS.Term

Synopsis

Documentation

type Term s = TermInf s Sym Source #

data TermInf s a Source #

Inferable terms, \(\mathit{Term}_\Rightarrow\).

Constructors

Var a

variable

\[ \frac {\Gamma (x) = \tau} {\color{darkblue}\Gamma \vdash \color{darkgreen}x \Rightarrow \color{darkred}\tau} \;\mathrm{V{\scriptstyle AR}} \]

Ann (TermChk s a) (TermInf s a)

annotated term

\[\frac {\color{darkblue}\Gamma \vdash \color{darkgreen}\rho \Leftarrow \color{darkred}{\sigma} \qquad \rho \leadsto \tau} {\color{darkblue}\Gamma \vdash \color{darkgreen}{x : \rho} \Rightarrow \color{darkred}\tau } \;\mathrm{A{\scriptstyle NN}} \]

Pi IrrSym (TermInf s a) (ScopeH IrrSym (TermInf s) (TermInf s) a)

dependent function space

\[\frac {\color{darkblue}\Gamma \vdash \color{darkgreen}{\rho} \Rightarrow \color{darkred}s \qquad \rho \leadsto \tau \qquad \color{darkblue}{\Gamma, x : \tau} \vdash \color{darkgreen}{\rho'} \Rightarrow \color{darkred}{s'} \qquad (s,s',s'') \in \mathcal{R} } {\color{darkblue}\Gamma \vdash \color{darkgreen}{\prod (x : \rho) \to \rho'} \Rightarrow \color{darkred}{s''} } \;\mathsf{Pi} \]

App (TermInf s a) (TermChk s a)

application

\[\frac {\color{darkblue}\Gamma \vdash \color{darkgreen}{e} \Rightarrow \color{darkred}{\prod (x : \tau) \to \tau'} \qquad \color{darkblue}\Gamma \vdash \color{darkgreen}{e'} \Leftarrow \color{darkred}\tau \qquad \tau'[x \mapsto e'] \leadsto \tau'' } {\color{darkblue}\Gamma \vdash \color{darkgreen}{e\, e'} \Rightarrow \color{darkred}{\tau''} } \;\mathrm{A{\scriptstyle PP}} \]

Sort s

sort

\[\frac {s : s' \in \mathcal{A}} {\color{darkblue}\Gamma \vdash \color{darkgreen}s \Rightarrow \color{darkred}{s'} } \;\mathrm{A{\scriptstyle XIOM}} \]

Sigma IrrSym (TermInf s a) (ScopeH IrrSym (TermInf s) (TermInf s) a)

Dependent pair

\[\frac {\color{darkblue}\Gamma \vdash \color{darkgreen}{\rho} \Rightarrow \color{darkred}s \qquad \rho \leadsto \tau \qquad \color{darkblue}{\Gamma, x : \tau} \vdash \color{darkgreen}{\rho'} \Rightarrow \color{darkred}{s'} \qquad (s,s',s'') \in \mathcal{R} } {\color{darkblue}\Gamma \vdash \color{darkgreen}{\sum (x : \rho) \to \rho'} \Rightarrow \color{darkred}{s''} } \;\mathsf{Sigma} \]

Equality (TermInf s a) (TermChk s a) (TermChk s a)

Propositional equality

\[\frac {\color{darkblue}\Gamma \vdash \color{darkgreen}{\rho} \Rightarrow \color{darkred}{s} \qquad \rho \leadsto \tau \qquad \color{darkblue}\Gamma \vdash \color{darkgreen}{x} \Leftarrow \color{darkred}{\tau} \qquad \color{darkblue}\Gamma \vdash \color{darkgreen}{y} \Leftarrow \color{darkred}{\tau} } {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathsf{Eq}\;\rho\;x\;y} \Rightarrow \color{darkred}{s} } \;\mathsf{Eq} \]

J (V3 IrrSym) (TermInf s a) (ScopeInf IrrSym3 s a) (TermChk s a) (TermChk s a) (TermChk s a) (TermChk s a)

J-rule. Propositional equality elimination.

\[\frac {\array{ \color{darkblue}\Gamma \vdash \color{darkgreen}{a} \Rightarrow \color{darkred}{s} \qquad s \in \mathcal{S} \cr \color{darkblue}{\Gamma, x : A, y : A, z : \mathsf{Eq}\,a\,x\,y} \vdash \color{darkgreen}{P} \Rightarrow \color{darkred}{s'} \qquad s' \in \mathcal{S} \cr \color{darkblue}{\Gamma, q : A} \vdash \color{darkgreen}{r} \Leftarrow \color{darkred}{P [ x \mapsto q; y \mapsto q; z \mapsto \mathsf{refl}]} \cr \color{darkblue}{\Gamma} \vdash \color{darkgreen}{u} \Leftarrow \color{darkred}{a} \qquad \color{darkblue}{\Gamma} \vdash \color{darkgreen}{v} \Leftarrow \color{darkred}{a} \qquad \color{darkblue}{\Gamma} \vdash \color{darkgreen}{w} \Leftarrow \color{darkred}{\mathsf{Eq}\,A\,u\,v} }} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathsf{J}\;a\;(\lambda\,x\,y\,z \to c)\;(\lambda\,q \to r)\;u\,v\,w} \Rightarrow \color{darkred}{P [ x \mapsto u; y \mapsto v; z \mapsto w]} } \;\mathsf{J} \]

Unit

Tautology.

\[\frac {} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\top} \Rightarrow \color{darkred}\star} \]

I

Tautology witness.

\[\frac {} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathsf{I}} \Rightarrow \color{darkred}\top} \]

Empty

Contradiction.

\[\frac {} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\bot} \Rightarrow \color{darkred}\star} \]

TermBool

Booleans

\[\frac {} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathbb{B}} \Rightarrow \color{darkred}\star } \]

TermTrue

True.

\[\frac {} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathsf{True}} \Rightarrow \color{darkred}{\mathbb{B}} } \]

TermFalse

False.

\[\frac {} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathsf{False}} \Rightarrow \color{darkred}{\mathbb{B}} } \]

TermBoolElim IrrSym (ScopeInf IrrSym s a) (TermChk s a) (TermChk s a) (TermChk s a)

Boolean elimination.

Note: \(\mathbb{B}\mathsf{-elim}\) is universe-polymorphic.

\[ \frac {\array{ \color{darkblue}{\Gamma, x : \mathbb{B}} \vdash \color{darkgreen}P \Rightarrow \color{darkred}{s} \qquad (\star, s, s') \in \mathcal{R} \cr P[x \mapsto \mathsf{True}] \leadsto \tau \qquad \color{darkblue}\Gamma \vdash \color{darkgreen}t \Leftarrow \color{darkred}{\tau} \cr P[x \mapsto \mathsf{False}] \leadsto \tau' \qquad \color{darkblue}\Gamma \vdash \color{darkgreen}f \Leftarrow \color{darkred}{\tau'} \cr \color{darkblue}\Gamma \vdash \color{darkgreen}b \Leftarrow \color{darkred}{\mathbb{B}} \qquad P[x \mapsto b] \leadsto \sigma }} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathbb{B}\mathsf{-elim}\,(\lambda\, x \to P) \,t\,f\,b} \Rightarrow \color{darkred}{\sigma} } \]

TermAnd (TermChk s a) (TermChk s a)

Boolean conjunction, and.

\[ \frac {\array{ \color{darkblue}\Gamma \vdash \color{darkgreen}x \Leftarrow \color{darkred}{\mathbb{B}} \qquad \color{darkblue}\Gamma \vdash \color{darkgreen}y \Leftarrow \color{darkred}{\mathbb{B}} }} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathbb{B}\mathsf{-and}\,x\,y} \Rightarrow \color{darkred}{\mathbb{B}} } \]

TermNat

Natural numbers.

\[\frac {\star \in \mathcal{S}} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathbb{N}} \Rightarrow \color{darkred}\star } \]

TermNatZ

Zero.

\[\frac {} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathsf{Zero}} \Rightarrow \color{darkred}{\mathbb{N}} } \]

TermNatS (TermChk s a)

Successor

\[\frac {\color{darkbluw}\Gamma \vdash \color{darkgreen}{n} \Leftarrow \color{darkred}{\mathbb{N}} } {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathsf{Succ}\,n} \Rightarrow \color{darkred}{\mathbb{N}} } \]

TermNatElim IrrSym (ScopeInf IrrSym s a) (TermChk s a) (TermChk s a) (TermChk s a)

Natural numbers elimination.

Here we have to assume the target sort (or parametrise further!).

\[ \frac {\array{ \color{darkblue}{\Gamma, x : \mathbb{N}} \vdash \color{darkgreen}P \Leftarrow \color{darkred}{s} \qquad (\star, s, s') \in \mathcal{R} \cr P[x \mapsto \mathsf{Zero}] \leadsto \tau \qquad \color{darkblue}\Gamma \vdash \color{darkgreen}z \Leftarrow \color{darkred}{\tau} \cr \prod (l : \mathbb{N}) \to P[x \mapsto l] \to P[x \mapsto \mathsf{Succ}\,l] \leadsto \tau' \qquad \color{darkblue}\Gamma \vdash \color{darkgreen}s \Leftarrow \color{darkred}{\tau'} \cr \color{darkblue}\Gamma \vdash \color{darkgreen}n \Leftarrow \color{darkred}{\mathbb{N}} \qquad P[x \mapsto n] \leadsto \sigma }} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathbb{N}\mathsf{-elim}\,(\lambda\, x \to p)\,z\,s\,n} \Rightarrow \color{darkred}{\sigma} } \]

TermPlus (TermChk s a) (TermChk s a)

Natural number addition, plus.

\[ \frac {\array{ \color{darkblue}\Gamma \vdash \color{darkgreen}x \Leftarrow \color{darkred}{\mathbb{N}} \qquad \color{darkblue}\Gamma \vdash \color{darkgreen}y \Leftarrow \color{darkred}{\mathbb{N}} }} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathbb{N}\mathsf{-plus}\,x\,y} \Rightarrow \color{darkred}{\mathbb{N}} } \]

TermTimes (TermChk s a) (TermChk s a)

Natural number addition, times.

\[ \frac {\array{ \color{darkblue}\Gamma \vdash \color{darkgreen}x \Leftarrow \color{darkred}{\mathbb{N}} \qquad \color{darkblue}\Gamma \vdash \color{darkgreen}y \Leftarrow \color{darkred}{\mathbb{N}} }} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathbb{N}\mathsf{-times}\,x\,y} \Rightarrow \color{darkred}{\mathbb{N}} } \]

Hadron (Set Sym)

Hadron type.

In physics, quarks combine to form composite particles called hadrons. In our type system(s) quark combine to form types. Hadrons are finite sets (enumerations).

We call single quark hadrons atoms. This is not true in physics, but we do get lisp-like atoms this way; i.e. things which are equal to itself only. But we agree with modern physics: atoms are not indivisible.

\[\frac {\star \in \mathcal{S}} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\{\overline{:\!\!q}\}} \Rightarrow \color{darkred}\star } \]

QuarkElim IrrSym (ScopeInf IrrSym s a) (Map Sym (TermChk s a)) (TermChk s a)

Quark elimination.

The rule is not the same as in PiSigma label (which influenced quark design). There the rule is checkable, but we have to provide a motive.

Note: here we infer the type of hadron from the match clauses. That way we get exhautivity check.

The real reason for the quark name is because \(\mathbb{Q}\) is better supported in fonts, than e.g. \(\mathbb{L}\).

\[ \frac {\array{ \color{darkblue}{\Gamma, x : \{\overline{:\!\!q}\}} \vdash \color{darkgreen}P \Rightarrow \color{darkred}{s} \qquad (\star, s, s') \in \mathcal{R} \cr P[x \mapsto :\!\!q_i] \leadsto \tau_i \qquad \color{darkblue}\Gamma \vdash \color{darkgreen}{u_i} \Leftarrow \color{darkred}{\tau_i} \cr \color{darkblue}\Gamma \vdash \color{darkgreen}t \Leftarrow \color{darkred}{\{\overline{:\!\!q}\}} \qquad P[x \mapsto t] \leadsto \sigma }} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathbb{Q}\mathsf{-elim}\,(\lambda\, x \to P)\;\{\overline{:\!\!q \longrightarrow u}\}\;t} \Rightarrow \color{darkred}{\sigma} } \]

Instances
CanSort TermInf Source # 
Instance details

Defined in Language.PTS.Smart

Methods

sort_ :: s -> TermInf s a Source #

TermConv TermInf Source # 
Instance details

Defined in Language.PTS.Smart

Methods

toTermChk :: TermInf s a -> TermChk s a Source #

fromTermInf :: TermInf s a -> TermInf s a Source #

WHNF TermInf Source # 
Instance details

Defined in Language.PTS.WHNF

Methods

whnf :: TermInf s a -> TermInf s a Source #

CanPi TermInf TermChk Source # 
Instance details

Defined in Language.PTS.Smart

Methods

pi_ :: Sym -> TermInf s Sym -> TermInf s Sym -> TermChk s Sym Source #

(~>) :: Specification s => TermInf s a -> TermInf s a -> TermChk s a Source #

sigma_ :: Sym -> TermInf s Sym -> TermInf s Sym -> TermChk s Sym Source #

CanPi TermInf TermInf Source # 
Instance details

Defined in Language.PTS.Smart

Methods

pi_ :: Sym -> TermInf s Sym -> TermInf s Sym -> TermInf s Sym Source #

(~>) :: Specification s => TermInf s a -> TermInf s a -> TermInf s a Source #

sigma_ :: Sym -> TermInf s Sym -> TermInf s Sym -> TermInf s Sym Source #

Convert TermInf TermChk Source # 
Instance details

Defined in Language.PTS.Smart

Methods

convert :: TermInf s a -> TermChk s a Source #

Convert TermInf TermInf Source # 
Instance details

Defined in Language.PTS.Smart

Methods

convert :: TermInf s a -> TermInf s a Source #

Quote ValueElim TermInf Source # 
Instance details

Defined in Language.PTS.Quote

Methods

quote_ :: Specification s => ValueElim Void s a -> TermInf s a Source #

CanApp TermInf TermChk TermChk Source # 
Instance details

Defined in Language.PTS.Smart

Methods

(@@) :: TermInf s a -> TermChk s a -> TermChk s a Source #

CanApp TermInf TermChk TermInf Source # 
Instance details

Defined in Language.PTS.Smart

Methods

(@@) :: TermInf s a -> TermChk s a -> TermInf s a Source #

Monad (TermInf s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

(>>=) :: TermInf s a -> (a -> TermInf s b) -> TermInf s b Source #

(>>) :: TermInf s a -> TermInf s b -> TermInf s b Source #

return :: a -> TermInf s a Source #

fail :: String -> TermInf s a Source #

Functor (TermInf s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

fmap :: (a -> b) -> TermInf s a -> TermInf s b Source #

(<$) :: a -> TermInf s b -> TermInf s a Source #

Applicative (TermInf s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

pure :: a -> TermInf s a Source #

(<*>) :: TermInf s (a -> b) -> TermInf s a -> TermInf s b Source #

liftA2 :: (a -> b -> c) -> TermInf s a -> TermInf s b -> TermInf s c Source #

(*>) :: TermInf s a -> TermInf s b -> TermInf s b Source #

(<*) :: TermInf s a -> TermInf s b -> TermInf s a Source #

Foldable (TermInf s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

fold :: Monoid m => TermInf s m -> m Source #

foldMap :: Monoid m => (a -> m) -> TermInf s a -> m Source #

foldr :: (a -> b -> b) -> b -> TermInf s a -> b Source #

foldr' :: (a -> b -> b) -> b -> TermInf s a -> b Source #

foldl :: (b -> a -> b) -> b -> TermInf s a -> b Source #

foldl' :: (b -> a -> b) -> b -> TermInf s a -> b Source #

foldr1 :: (a -> a -> a) -> TermInf s a -> a Source #

foldl1 :: (a -> a -> a) -> TermInf s a -> a Source #

toList :: TermInf s a -> [a] Source #

null :: TermInf s a -> Bool Source #

length :: TermInf s a -> Int Source #

elem :: Eq a => a -> TermInf s a -> Bool Source #

maximum :: Ord a => TermInf s a -> a Source #

minimum :: Ord a => TermInf s a -> a Source #

sum :: Num a => TermInf s a -> a Source #

product :: Num a => TermInf s a -> a Source #

Traversable (TermInf s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

traverse :: Applicative f => (a -> f b) -> TermInf s a -> f (TermInf s b) Source #

sequenceA :: Applicative f => TermInf s (f a) -> f (TermInf s a) Source #

mapM :: Monad m => (a -> m b) -> TermInf s a -> m (TermInf s b) Source #

sequence :: Monad m => TermInf s (m a) -> m (TermInf s a) Source #

Show s => Show1 (TermInf s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> TermInf s a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [TermInf s a] -> ShowS Source #

Specification s => PrettyPrec1 (TermInf s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

liftPpp :: (Prec -> a -> PrettyM Doc) -> Prec -> TermInf s a -> PrettyM Doc Source #

Module (TermChk s) (TermInf s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

(>>==) :: TermChk s a -> (a -> TermInf s b) -> TermChk s b #

Module (TermInf s) (TermInf s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

(>>==) :: TermInf s a -> (a -> TermInf s b) -> TermInf s b #

IsString a => Num (TermInf s a) Source # 
Instance details

Defined in Language.PTS.Term

Methods

(+) :: TermInf s a -> TermInf s a -> TermInf s a Source #

(-) :: TermInf s a -> TermInf s a -> TermInf s a Source #

(*) :: TermInf s a -> TermInf s a -> TermInf s a Source #

negate :: TermInf s a -> TermInf s a Source #

abs :: TermInf s a -> TermInf s a Source #

signum :: TermInf s a -> TermInf s a Source #

fromInteger :: Integer -> TermInf s a Source #

(Show a, Show s) => Show (TermInf s a) Source # 
Instance details

Defined in Language.PTS.Term

Methods

showsPrec :: Int -> TermInf s a -> ShowS Source #

show :: TermInf s a -> String Source #

showList :: [TermInf s a] -> ShowS Source #

IsString a => IsString (TermInf s a) Source # 
Instance details

Defined in Language.PTS.Term

Methods

fromString :: String -> TermInf s a Source #

(Specification s, PrettyPrec a) => PrettyPrec (TermInf s a) Source # 
Instance details

Defined in Language.PTS.Term

Methods

ppp :: Prec -> TermInf s a -> PrettyM Doc Source #

data TermChk s a Source #

Checkable terms, \(\mathit{Term}_\Leftarrow\).

A type of the same kind as TermInf to allow abstracting over them.

Constructors

Inf (TermInf s a)

Inferrable terms

\[\frac {\color{darkblue}\Gamma \vdash \color{darkgreen}x \Rightarrow \color{darkred}{\tau'} \qquad \tau \equiv \tau' } {\color{darkblue}\Gamma \vdash \color{darkgreen}x \Leftarrow \color{darkred}\tau } \;\mathrm{C{\scriptstyle HK}} \]

Lam IrrSym (ScopeChkInf IrrSym s a)

Lambda abstraction

\[\frac {\color{darkblue}{\Gamma, x : \tau} \vdash \color{darkgreen}{e} \Leftarrow \color{darkred}{\tau'}} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\lambda\, x \to e} \Leftarrow \color{darkred}{\prod (x : \tau) \to \tau'}} \;\mathrm{L{\scriptstyle AM}} \]

Pair (TermChk s a) (TermChk s a)

Dependent pair

\[\frac {\color{darkblue}\Gamma \vdash \color{darkgreen}{x} \Leftarrow \color{darkred}{\tau} \qquad \color{darkblue}\Gamma \vdash \color{darkgreen}{y} \Leftarrow \color{darkred}{\tau' [ x \mapsto \tau} ] } {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathsf{pair}\;x\;y} \Leftarrow \color{darkred}{\sum (x : \tau) \to \tau'}} \]

Match (TermInf s a) IrrSym IrrSym (ScopeChkInf IrrSym2 s a)

Dependent pattern match

match p (x y -> b) ~ (x y -> b) (fst p) (snd p)

\[\frac { \color{darkblue}\Gamma \vdash \color{darkgreen}p \Rightarrow \color{darkred}{\sum (z : \tau) \to \tau'} \qquad \color{darkblue}{\Gamma, x : \tau, y : \tau' [z \mapsto x]} \vdash b \Leftarrow \color{darkred}{\tau''} } {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathsf{match}\;p\;(\lambda\, x\, y \to b)} \Leftarrow \color{darkred}{\tau''}} \]

Refl

Witness or propositional equality

\[\frac {x \equiv y} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathsf{refl}} \Leftarrow \color{darkred}{\mathsf{Eq}\;\tau\;x\;y}} \]

Absurd (TermChk s a)

Ex falso quodlibet.

\[\frac {\color{darkblue}\Gamma \vdash \color{darkgreen}{x} \Leftarrow \color{darkred}\bot} {\color{darkblue}\Gamma \vdash \color{darkgreen}{\mathsf{absurd}\;x} \Leftarrow \color{darkred}{\tau}} \]

Quark Sym

Single quark.

Compare to Booleans: TermTrue and TermFalse. Here we don't know the type of hadron a quark belongs to, we must check it; On the other hand, Boolean literals are inferrable.

Quarks are prefixed with a colon, to syntatically distinguish them.

\[\frac {:\!\!x \in \overline{:\!\!q}} {\color{darkblue}\Gamma \vdash \color{darkgreen}{:\!\!x} \Leftarrow \color{darkred}{\{\overline{:\!\!q}\}} } \]

Instances
CanLam TermChk Source # 
Instance details

Defined in Language.PTS.Smart

Methods

lam_ :: Sym -> TermChk s Sym -> TermChk s Sym Source #

CanSort TermChk Source # 
Instance details

Defined in Language.PTS.Smart

Methods

sort_ :: s -> TermChk s a Source #

TermConv TermChk Source # 
Instance details

Defined in Language.PTS.Smart

Methods

toTermChk :: TermChk s a -> TermChk s a Source #

fromTermInf :: TermInf s a -> TermChk s a Source #

WHNF TermChk Source # 
Instance details

Defined in Language.PTS.WHNF

Methods

whnf :: TermChk s a -> TermChk s a Source #

CanPi TermInf TermChk Source # 
Instance details

Defined in Language.PTS.Smart

Methods

pi_ :: Sym -> TermInf s Sym -> TermInf s Sym -> TermChk s Sym Source #

(~>) :: Specification s => TermInf s a -> TermInf s a -> TermChk s a Source #

sigma_ :: Sym -> TermInf s Sym -> TermInf s Sym -> TermChk s Sym Source #

Convert TermInf TermChk Source # 
Instance details

Defined in Language.PTS.Smart

Methods

convert :: TermInf s a -> TermChk s a Source #

Quote ValueIntro TermChk Source # 
Instance details

Defined in Language.PTS.Quote

Methods

quote_ :: Specification s => ValueIntro Void s a -> TermChk s a Source #

CanApp TermInf TermChk TermChk Source # 
Instance details

Defined in Language.PTS.Smart

Methods

(@@) :: TermInf s a -> TermChk s a -> TermChk s a Source #

CanApp TermInf TermChk TermInf Source # 
Instance details

Defined in Language.PTS.Smart

Methods

(@@) :: TermInf s a -> TermChk s a -> TermInf s a Source #

Functor (TermChk s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

fmap :: (a -> b) -> TermChk s a -> TermChk s b Source #

(<$) :: a -> TermChk s b -> TermChk s a Source #

Foldable (TermChk s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

fold :: Monoid m => TermChk s m -> m Source #

foldMap :: Monoid m => (a -> m) -> TermChk s a -> m Source #

foldr :: (a -> b -> b) -> b -> TermChk s a -> b Source #

foldr' :: (a -> b -> b) -> b -> TermChk s a -> b Source #

foldl :: (b -> a -> b) -> b -> TermChk s a -> b Source #

foldl' :: (b -> a -> b) -> b -> TermChk s a -> b Source #

foldr1 :: (a -> a -> a) -> TermChk s a -> a Source #

foldl1 :: (a -> a -> a) -> TermChk s a -> a Source #

toList :: TermChk s a -> [a] Source #

null :: TermChk s a -> Bool Source #

length :: TermChk s a -> Int Source #

elem :: Eq a => a -> TermChk s a -> Bool Source #

maximum :: Ord a => TermChk s a -> a Source #

minimum :: Ord a => TermChk s a -> a Source #

sum :: Num a => TermChk s a -> a Source #

product :: Num a => TermChk s a -> a Source #

Traversable (TermChk s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

traverse :: Applicative f => (a -> f b) -> TermChk s a -> f (TermChk s b) Source #

sequenceA :: Applicative f => TermChk s (f a) -> f (TermChk s a) Source #

mapM :: Monad m => (a -> m b) -> TermChk s a -> m (TermChk s b) Source #

sequence :: Monad m => TermChk s (m a) -> m (TermChk s a) Source #

Show s => Show1 (TermChk s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> TermChk s a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [TermChk s a] -> ShowS Source #

Specification s => PrettyPrec1 (TermChk s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

liftPpp :: (Prec -> a -> PrettyM Doc) -> Prec -> TermChk s a -> PrettyM Doc Source #

Module (TermChk s) (TermInf s) Source # 
Instance details

Defined in Language.PTS.Term

Methods

(>>==) :: TermChk s a -> (a -> TermInf s b) -> TermChk s b #

IsString a => Num (TermChk s a) Source # 
Instance details

Defined in Language.PTS.Term

Methods

(+) :: TermChk s a -> TermChk s a -> TermChk s a Source #

(-) :: TermChk s a -> TermChk s a -> TermChk s a Source #

(*) :: TermChk s a -> TermChk s a -> TermChk s a Source #

negate :: TermChk s a -> TermChk s a Source #

abs :: TermChk s a -> TermChk s a Source #

signum :: TermChk s a -> TermChk s a Source #

fromInteger :: Integer -> TermChk s a Source #

(Show a, Show s) => Show (TermChk s a) Source # 
Instance details

Defined in Language.PTS.Term

Methods

showsPrec :: Int -> TermChk s a -> ShowS Source #

show :: TermChk s a -> String Source #

showList :: [TermChk s a] -> ShowS Source #

IsString a => IsString (TermChk s a) Source # 
Instance details

Defined in Language.PTS.Term

Methods

fromString :: String -> TermChk s a Source #

(Specification s, PrettyPrec a) => PrettyPrec (TermChk s a) Source # 
Instance details

Defined in Language.PTS.Term

Methods

ppp :: Prec -> TermChk s a -> PrettyM Doc Source #

type ScopeInf n s a = ScopeH n (TermInf s) (TermInf s) a Source #

type ScopeChkInf n s a = ScopeH n (TermChk s) (TermInf s) a Source #