Safe Haskell | None |
---|---|
Language | Haskell2010 |
Using magic of type-classes we can make...
Synopsis
- class TermConv t where
- class ValueConv v where
- class Convert u v | v -> u where
- class CanApp u v w | w -> u v where
- (@@@) :: (TermConv t, TermConv t') => TermInf s a -> t s a -> t' s a
- apps_ :: CanApp u v u => u s a -> [v s a] -> u s a
- class Convert u v => CanPi u v | v -> u where
- forall_ :: (CanPi u v, CanSort u, Specification s) => Sym -> u s Sym -> v s Sym
- foralls_ :: (CanPi u v, CanPi u u, CanSort u, Specification s) => [Sym] -> u s Sym -> v s Sym
- class CanSort u where
- class CanLam u where
- lams_ :: CanLam u => [Sym] -> u s Sym -> u s Sym
- ann_ :: TermChk s a -> TermInf s a -> TermInf s a
- (-:-) :: TermChk s a -> TermInf s a -> TermInf s a
- let_ :: [(Sym, Term s)] -> Term s -> Term s
- (.=) :: a -> b -> (a, b)
Documentation
class ValueConv v where Source #
toValueIntro :: v err s a -> ValueIntro err s a Source #
Instances
ValueConv ValueElim Source # | |
Defined in Language.PTS.Smart toValueIntro :: ValueElim err s a -> ValueIntro err s a Source # | |
ValueConv ValueIntro Source # | |
Defined in Language.PTS.Smart toValueIntro :: ValueIntro err s a -> ValueIntro err s a Source # |
class Convert u v | v -> u where Source #
Instances
Convert TermInf TermChk Source # | |
Convert TermInf TermInf Source # | |
Convert (ValueIntro err) (ValueIntro err) Source # | |
Defined in Language.PTS.Smart convert :: ValueIntro err s a -> ValueIntro err s a Source # |
class CanApp u v w | w -> u v where Source #
Instances
CanApp TermInf TermChk TermChk Source # | |
CanApp TermInf TermChk TermInf Source # | |
CanApp (ValueElim err) (ValueIntro err) (ValueIntro err) Source # | |
Defined in Language.PTS.Smart (@@) :: ValueElim err s a -> ValueIntro err s a -> ValueIntro err s a Source # | |
CanApp (ValueElim err) (ValueIntro err) (ValueElim err) Source # | |
Defined in Language.PTS.Smart |
(@@@) :: (TermConv t, TermConv t') => TermInf s a -> t s a -> t' s a infixl 3 Source #
More polymorphic @@
.
class Convert u v => CanPi u v | v -> u where Source #
pi_ :: Sym -> u s Sym -> u s Sym -> v s Sym Source #
(~>) :: Specification s => u s a -> u s a -> v s a infixr 2 Source #
non-dependent function space.
\[ \alpha \to \beta ::= \Pi (- : \alpha). \beta \]
Instances
CanPi TermInf TermChk Source # | |
CanPi TermInf TermInf Source # | |
CanPi (ValueIntro err) (ValueIntro err) Source # | |
Defined in Language.PTS.Smart pi_ :: Sym -> ValueIntro err s Sym -> ValueIntro err s Sym -> ValueIntro err s Sym Source # (~>) :: Specification s => ValueIntro err s a -> ValueIntro err s a -> ValueIntro err s a Source # sigma_ :: Sym -> ValueIntro err s Sym -> ValueIntro err s Sym -> ValueIntro err s Sym Source # |
forall_ :: (CanPi u v, CanSort u, Specification s) => Sym -> u s Sym -> v s Sym Source #
Polymorphic, rank-1 types.
\[ \forall \alpha. F\,\alpha ::= \Pi (\alpha : \star). F\,\alpha \]
foralls_ :: (CanPi u v, CanPi u u, CanSort u, Specification s) => [Sym] -> u s Sym -> v s Sym Source #
>>>
:set -XOverloadedStrings