print non-dependent function types as "π.A → B"
This commit is contained in:
parent
8f0f0c1891
commit
443da20c4b
2 changed files with 16 additions and 12 deletions
|
@ -165,8 +165,12 @@ parameters (showSubsts : Bool)
|
|||
where
|
||||
prettyM (TYPE l) =
|
||||
parensIfM App $ !typeD <+> hl Syntax !(prettyUnivSuffix l)
|
||||
prettyM (Pi qty s (S [< x] t)) =
|
||||
prettyBindType (Just qty) x s !arrowD t.term
|
||||
prettyM (Pi qty s (S _ (N t))) = do
|
||||
dom <- pretty0M $ MkWithQty qty s
|
||||
cod <- withPrec AnnR $ prettyM t
|
||||
parensIfM AnnR $ asep [dom <++> !arrowD, cod]
|
||||
prettyM (Pi qty s (S [< x] (Y t))) =
|
||||
prettyBindType (Just qty) x s !arrowD t
|
||||
prettyM (Lam (S x t)) =
|
||||
let GotLams {names, body, _} = getLams' x t.term Refl in
|
||||
prettyLams (Just !lamD) T (toSnocList' names) body
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue