remove square brackets around type lines
(parens are needed if they are anything other than a `term arg`)
This commit is contained in:
parent
d631b86be3
commit
64de93a13c
7 changed files with 42 additions and 35 deletions
|
@ -136,9 +136,9 @@ prettyTypeLine : {opts : _} ->
|
|||
DScopeTerm d n ->
|
||||
Eff Pretty (Doc opts)
|
||||
prettyTypeLine dnames tnames (S _ (N body)) =
|
||||
bracks =<< withPrec Outer (prettyTerm dnames tnames body)
|
||||
withPrec Arg (prettyTerm dnames tnames body)
|
||||
prettyTypeLine dnames tnames (S [< i] (Y body)) =
|
||||
bracks =<< do
|
||||
parens =<< do
|
||||
i' <- prettyDBind i
|
||||
ty' <- withPrec Outer $ prettyTerm (dnames :< i) tnames body
|
||||
pure $ sep [hsep [i', !darrowD], ty']
|
||||
|
@ -281,9 +281,9 @@ prettyTag tag = hl Tag $ text $ "'" ++ quoteTag tag
|
|||
export
|
||||
prettyEnum : {opts : _} -> List String -> Eff Pretty (Doc opts)
|
||||
prettyEnum cases =
|
||||
tightDelims "{" "}" =<<
|
||||
tightBraces =<<
|
||||
fillSeparateTight !commaD <$>
|
||||
traverse (hl Tag . text . quoteTag) cases
|
||||
traverse (hl Tag . Doc.text . quoteTag) cases
|
||||
|
||||
private
|
||||
prettyCaseRet : {opts : _} ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue