remove IsQty interface
This commit is contained in:
parent
5fdba77d04
commit
ba2818a865
24 changed files with 729 additions and 889 deletions
|
@ -113,7 +113,7 @@ dimConst = terminal "expecting 0 or 1" $
|
|||
\case Nat 0 => Just Zero; Nat 1 => Just One; _ => Nothing
|
||||
|
||||
export
|
||||
qty : Grammar True PQty
|
||||
qty : Grammar True Qty
|
||||
qty = terminal "expecting quantity" $
|
||||
\case Nat 0 => Just Zero; Nat 1 => Just One; Reserved "ω" => Just Any
|
||||
_ => Nothing
|
||||
|
@ -141,7 +141,7 @@ symbolsC lst = symbols lst <* commit
|
|||
|
||||
|
||||
private covering
|
||||
qtys : Grammar False (List PQty)
|
||||
qtys : Grammar False (List Qty)
|
||||
qtys = option [] [|toList $ some qty <* res "."|]
|
||||
|
||||
|
||||
|
@ -151,7 +151,7 @@ dim = [|V baseName|] <|> [|K dimConst|]
|
|||
|
||||
private
|
||||
0 PBinderHead : Nat -> Type
|
||||
PBinderHead n = (Vect n PQty, BName, PTerm)
|
||||
PBinderHead n = (Vect n Qty, BName, PTerm)
|
||||
|
||||
private
|
||||
toVect : List a -> (n ** Vect n a)
|
||||
|
@ -164,7 +164,7 @@ lamIntro : Grammar True (BName -> PTerm -> PTerm)
|
|||
lamIntro = symbolsC [(Lam, "λ"), (DLam, "δ")]
|
||||
|
||||
private covering
|
||||
caseIntro : Grammar True PQty
|
||||
caseIntro : Grammar True Qty
|
||||
caseIntro = symbols [(One, "case1"), (Any, "caseω")]
|
||||
<|> resC "case" *>
|
||||
(qty <* resC "." <|>
|
||||
|
@ -205,7 +205,7 @@ mutual
|
|||
zeroCase : Grammar True PTerm
|
||||
zeroCase = (resC "zero" <|> zero) *> darr *> term
|
||||
|
||||
succCase : Grammar True (BName, PQty, BName, PTerm)
|
||||
succCase : Grammar True (BName, Qty, BName, PTerm)
|
||||
succCase = do
|
||||
resC "succ"
|
||||
n <- bname
|
||||
|
@ -223,7 +223,7 @@ mutual
|
|||
pi, sigma : Grammar True PTerm
|
||||
pi = [|makePi (qty <* res ".") domain (resC "→" *> term)|]
|
||||
where
|
||||
makePi : PQty -> (BName, PTerm) -> PTerm -> PTerm
|
||||
makePi : Qty -> (BName, PTerm) -> PTerm -> PTerm
|
||||
makePi q (x, s) t = Pi q x s t
|
||||
domain = binderHead <|> [|(Nothing,) aTerm|]
|
||||
|
||||
|
@ -290,7 +290,7 @@ mutual
|
|||
|
||||
|
||||
export covering
|
||||
defIntro : Grammar True PQty
|
||||
defIntro : Grammar True Qty
|
||||
defIntro = symbols [(Zero, "def0"), (Any, "defω")]
|
||||
<|> resC "def" *> option Any (qty <* resC ".")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue