This commit is contained in:
rhiannon morris 2023-08-13 20:55:14 +02:00
parent 0dd3c231e6
commit 7a6c4c61d1
7 changed files with 201 additions and 96 deletions

View file

@ -361,6 +361,11 @@ public export %inline
enum : List TagVal -> Loc -> Term d n
enum ts loc = Enum (SortedSet.fromList ts) loc
public export %inline
caseEnum : Qty -> Elim d n -> ScopeTerm d n -> List (TagVal, Term d n) -> Loc ->
Elim d n
caseEnum q e ret arms loc = CaseEnum q e ret (SortedMap.fromList arms) loc
public export %inline
typeCase : Elim d n -> Term d n ->
List (TypeCaseArm d n) -> Term d n -> Loc -> Elim d n

View file

@ -147,24 +147,24 @@ weakE by t = t // shift by
parameters {s : Nat}
namespace ScopeTermBody
export %inline
public export %inline
(.term) : ScopedBody s (Term d) n -> Term d (s + n)
(Y b).term = b
(N b).term = weakT s b
namespace ScopeTermN
export %inline
public export %inline
(.term) : ScopeTermN s d n -> Term d (s + n)
t.term = t.body.term
namespace DScopeTermBody
export %inline
public export %inline
(.term) : ScopedBody s (\d => Term d n) d -> Term (s + d) n
(Y b).term = b
(N b).term = dweakT s b
namespace DScopeTermN
export %inline
public export %inline
(.term) : DScopeTermN s d n -> Term (s + d) n
t.term = t.body.term