| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Mikan.Syntax.Internal.Telescope
Contents
Synopsis
- data Tele a where
- type Telescope = Tele (Dom Type)
- mapAbsNames :: (ArgName -> ArgName) -> Tele a -> Tele a
- mapAbsNamesM :: Applicative m => (ArgName -> m ArgName) -> Tele a -> m (Tele a)
- telToArgs :: TelToArgs a => a -> [Arg ArgName]
- type ListTel = ListTel' ArgName
- type ListTel' a = [Dom (a, Type)]
- listTel :: Lens' Telescope ListTel
- telToList :: Tele (Dom t) -> [Dom (ArgName, t)]
- telFromList :: ListTel -> Telescope
- foldTeleIndices :: (Int -> b -> b) -> b -> Tele a -> b
- data Teletype
- unpackTeletype :: Teletype -> (Telescope, Type)
Telescopes
Sequence of types. An argument of the first type is bound in later types and so on.
Constructors
| EmptyTel |
Instances
mapAbsNamesM :: Applicative m => (ArgName -> m ArgName) -> Tele a -> m (Tele a) Source #
A traversal for the names in a telescope.
telToList :: Tele (Dom t) -> [Dom (ArgName, t)] Source #
Convert a telescope to its list form.
This function returns __IMPOSSIBLE__ if it encounters a NoAbs.
telFromList :: ListTel -> Telescope Source #
Convert a list telescope to a telescope.
foldTeleIndices :: (Int -> b -> b) -> b -> Tele a -> b Source #
Fold over the de Bruijn indices of a telescope.
This function returns __IMPOSSIBLE__ if it encounters a NoAbs.
Examples
>>>foldTeleIndices (:) (ExtendTel () $ Abs "x" $ ExtendTel () $ Abs "y" $ ExtendTel () $ Abs "z" EmptyTel)[2, 1, 0]
A Teletype represents a Type with some "pending"
quantification.
Teletypes are used to avoid the quadratic accumulation of PiSorts
when quantifying a type over a telescope, particularly in
metavariables.
Teletypes are otherwise identical to Types (by making quantifiers
into Pis); teletypes can be operated on transparently by the
functions in Mikan.TypeChecking.Telescope.
Instances
| Pretty Teletype Source # | |||||
| TermLike Teletype Source # | |||||
| AllMetas Teletype Source # | |||||
| NamesIn Teletype Source # | |||||
Defined in Mikan.Syntax.Internal.Names | |||||
| Reify Teletype Source # | |||||
Defined in Mikan.Syntax.Translation.InternalToAbstract Associated Types
| |||||
| Free Teletype Source # | |||||
Defined in Mikan.TypeChecking.Free.Generic | |||||
| PrettyTCM Teletype Source # | |||||
Defined in Mikan.TypeChecking.Pretty | |||||
| InstantiateFull Teletype Source # | |||||
Defined in Mikan.TypeChecking.Reduce | |||||
| EmbPrj Teletype Source # | |||||
| Subst Teletype Source # | |||||
Defined in Mikan.TypeChecking.Substitute Associated Types
Methods applySubst :: Substitution' (SubstArg Teletype) -> Teletype -> Teletype Source # | |||||
| NFData Teletype Source # | |||||
Defined in Mikan.Syntax.Internal.Telescope | |||||
| Generic Teletype Source # | |||||
Defined in Mikan.Syntax.Internal.Telescope Associated Types
| |||||
| Show Teletype Source # | |||||
| type ReifiesTo Teletype Source # | |||||
Defined in Mikan.Syntax.Translation.InternalToAbstract | |||||
| type SubstArg Teletype Source # | |||||
Defined in Mikan.TypeChecking.Substitute | |||||
| type Rep Teletype Source # | |||||
Defined in Mikan.Syntax.Internal.Telescope type Rep Teletype = D1 ('MetaData "Teletype" "Mikan.Syntax.Internal.Telescope" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'False) (C1 ('MetaCons "EmptyTt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :+: C1 ('MetaCons "ExtendTt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Dom Type)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (Abs Teletype)))) | |||||