pi/src/Ctx.idr

23 lines
420 B
Idris

module Ctx
import Misc
import Data.Nat
%default total
infixr 7 ::
public export
data Ctx : (Index -> Type) -> Index -> Type where
Nil : Ctx ty 0
(::) : {n : _} -> ty n -> Ctx ty n -> Ctx ty (S n)
public export
data Closure : (Index -> Type) -> Type where
MkClosure : {n : _} -> Ctx ty n -> ty n -> Closure ty
public export
lookup : {m : _} -> (n : Nat) -> Ctx ty m -> LT n m -> ty (minus m n)
lookup = ?wa