add (?!) for nondependent contexts
This commit is contained in:
parent
2a5b8ec815
commit
7bc58625a1
2 changed files with 9 additions and 0 deletions
|
@ -75,6 +75,11 @@ public export %inline
|
|||
(!!) : CanShift tm => Context tm len -> Var len -> tm len
|
||||
ctx !! i = getShift ctx i SZ
|
||||
|
||||
infixl 8 !?
|
||||
public export %inline
|
||||
(!?) : Context' tm len -> Var len -> tm
|
||||
ctx !? i = (ctx !! i) @{Const}
|
||||
|
||||
|
||||
||| a triangle of bindings. each type binding in a context counts the ues of
|
||||
||| others in its type, and all of these together form a triangle.
|
||||
|
|
|
@ -204,3 +204,7 @@ interface CanShift f where
|
|||
(//) : f from -> Shift from to -> f to
|
||||
|
||||
export CanShift Var where i // by = shift by i
|
||||
|
||||
namespace CanShift
|
||||
export
|
||||
[Const] CanShift (\_ => a) where x // _ = x
|
||||
|
|
Loading…
Reference in a new issue