rename Nat to NAT in AST
This commit is contained in:
parent
e0ed37720f
commit
fa7f82ae5a
24 changed files with 92 additions and 92 deletions
|
@ -211,8 +211,8 @@ parameters {auto _ : CanWhnf Term Interface.isRedexT}
|
|||
(ty // one q) loc
|
||||
|
||||
-- (coe ℕ @_ @_ s) ⇝ (s ∷ ℕ)
|
||||
Nat tyLoc =>
|
||||
whnf defs ctx sg $ Ann s (Nat tyLoc) loc
|
||||
NAT tyLoc =>
|
||||
whnf defs ctx sg $ Ann s (NAT tyLoc) loc
|
||||
|
||||
-- (coe String @_ @_ s) ⇝ (s ∷ String)
|
||||
STRING tyLoc =>
|
||||
|
|
|
@ -84,8 +84,8 @@ isTagHead _ = False
|
|||
||| an expression like `0 ∷ ℕ` or `suc n ∷ ℕ`
|
||||
public export %inline
|
||||
isNatHead : Elim {} -> Bool
|
||||
isNatHead (Ann (Zero {}) (Nat {}) _) = True
|
||||
isNatHead (Ann (Succ {}) (Nat {}) _) = True
|
||||
isNatHead (Ann (Zero {}) (NAT {}) _) = True
|
||||
isNatHead (Ann (Succ {}) (NAT {}) _) = True
|
||||
isNatHead (Coe {}) = True
|
||||
isNatHead _ = False
|
||||
|
||||
|
@ -121,7 +121,7 @@ isTyCon (Enum {}) = True
|
|||
isTyCon (Tag {}) = False
|
||||
isTyCon (Eq {}) = True
|
||||
isTyCon (DLam {}) = False
|
||||
isTyCon (Nat {}) = True
|
||||
isTyCon (NAT {}) = True
|
||||
isTyCon (Zero {}) = False
|
||||
isTyCon (Succ {}) = False
|
||||
isTyCon (STRING {}) = True
|
||||
|
@ -168,7 +168,7 @@ canPushCoe sg (Enum {}) _ = True
|
|||
canPushCoe sg (Tag {}) _ = False
|
||||
canPushCoe sg (Eq {}) _ = True
|
||||
canPushCoe sg (DLam {}) _ = False
|
||||
canPushCoe sg (Nat {}) _ = True
|
||||
canPushCoe sg (NAT {}) _ = True
|
||||
canPushCoe sg (Zero {}) _ = False
|
||||
canPushCoe sg (Succ {}) _ = False
|
||||
canPushCoe sg (STRING {}) _ = True
|
||||
|
|
|
@ -113,10 +113,10 @@ CanWhnf Elim Interface.isRedexE where
|
|||
Left _ =>
|
||||
let ty = sub1 ret nat in
|
||||
case nat of
|
||||
Ann (Zero _) (Nat _) _ =>
|
||||
Ann (Zero _) (NAT _) _ =>
|
||||
whnf defs ctx sg $ Ann zer ty zer.loc
|
||||
Ann (Succ n succLoc) (Nat natLoc) _ =>
|
||||
let nn = Ann n (Nat natLoc) succLoc
|
||||
Ann (Succ n succLoc) (NAT natLoc) _ =>
|
||||
let nn = Ann n (NAT natLoc) succLoc
|
||||
tm = subN suc [< nn, CaseNat pi piIH nn ret zer suc caseLoc]
|
||||
in
|
||||
whnf defs ctx sg $ Ann tm ty caseLoc
|
||||
|
@ -235,7 +235,7 @@ CanWhnf Term Interface.isRedexT where
|
|||
whnf _ _ _ t@(Tag {}) = pure $ nred t
|
||||
whnf _ _ _ t@(Eq {}) = pure $ nred t
|
||||
whnf _ _ _ t@(DLam {}) = pure $ nred t
|
||||
whnf _ _ _ t@(Nat {}) = pure $ nred t
|
||||
whnf _ _ _ t@(NAT {}) = pure $ nred t
|
||||
whnf _ _ _ t@(Zero {}) = pure $ nred t
|
||||
whnf _ _ _ t@(Succ {}) = pure $ nred t
|
||||
whnf _ _ _ t@(STRING {}) = pure $ nred t
|
||||
|
|
|
@ -156,7 +156,7 @@ parameters {auto _ : CanWhnf Term Interface.isRedexT}
|
|||
ret loc
|
||||
|
||||
-- (type-case ℕ ∷ _ return Q of { ℕ ⇒ s; ⋯ }) ⇝ s ∷ Q
|
||||
Nat {} =>
|
||||
NAT {} =>
|
||||
whnf defs ctx SZero $ Ann (tycaseRhsDef0 def KNat arms) ret loc
|
||||
|
||||
-- (type-case String ∷ _ return Q of { String ⇒ s; ⋯ }) ⇝ s ∷ Q
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue