print non-dependent products (easy mode)
only if the AST uses SN, like with Eq
This commit is contained in:
parent
958bc2f8b8
commit
ea24d00544
5 changed files with 39 additions and 19 deletions
|
@ -224,10 +224,14 @@ mutual
|
|||
private covering
|
||||
infixEqTerm : Grammar True PTerm
|
||||
infixEqTerm = do
|
||||
l <- appTerm
|
||||
rty <- optional [|MkPair (resC "≡" *> term) (resC ":" *> appTerm)|]
|
||||
l <- infixTimesTerm
|
||||
rty <- optional [|MkPair (resC "≡" *> term) (resC ":" *> infixTimesTerm)|]
|
||||
pure $ maybe l (\rty => Eq (Nothing, snd rty) l (fst rty)) rty
|
||||
|
||||
private covering
|
||||
infixTimesTerm : Grammar True PTerm
|
||||
infixTimesTerm = foldr1 (Sig Nothing) <$> sepBy1 (resC "×") appTerm
|
||||
|
||||
private covering
|
||||
appTerm : Grammar True PTerm
|
||||
appTerm = resC "★" *> [|TYPE nat|]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue