| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
DeBruijn.Lvl
Synopsis
- data Lvl ctx
- lvlToIdx :: Size ctx -> Lvl ctx -> Idx ctx
- lvlZ :: Size ctx -> Lvl (S ctx)
- sinkLvl :: Lvl ctx -> Lvl (S ctx)
- class Sinkable t where
- sink :: Sinkable t => t ctx -> t (S ctx)
- mapSink :: (Functor f, Sinkable t) => f (t ctx) -> f (t (S ctx))
- sinkSize :: Sinkable t => Size ctx -> t EmptyCtx -> t ctx
- mapSinkSize :: (Functor f, Sinkable t) => Size ctx -> f (t EmptyCtx) -> f (t ctx)
- sinkAdd :: Sinkable t => Add n ctx ctx' -> t ctx -> t ctx'
- mapSinkAdd :: (Functor f, Sinkable t) => Add n ctx ctx' -> f (t ctx) -> f (t ctx')
Documentation
de Bruijn levels.
lvlToIdx :: Size ctx -> Lvl ctx -> Idx ctx Source #
Convert level to index.
>>>lvlToIdx S2 (lvlZ S1)0
sinkLvl :: Lvl ctx -> Lvl (S ctx) Source #
Sink Lvl into a larger context.
>>>sinkLvl (lvlZ S3)3
>>>sink (lvlZ S3)3
>>>mapLvl (LS LZ) (lvlZ S3)3