print ; between case branches

This commit is contained in:
rhiannon morris 2023-03-26 16:13:36 +02:00
parent 46e13c8ca2
commit e6c4203b46

View file

@ -25,10 +25,11 @@ annD = hlF Syntax $ ifUnicode "∷" "::"
natD = hlF Syntax $ ifUnicode "" "Nat"
export %inline
eqD, colonD, commaD, caseD, returnD, ofD, dotD, zeroD, succD : Doc HL
eqD, colonD, commaD, semiD, caseD, returnD, ofD, dotD, zeroD, succD : Doc HL
eqD = hl Syntax "Eq"
colonD = hl Syntax ":"
commaD = hl Syntax ","
semiD = hl Syntax ";"
caseD = hl Syntax "case"
ofD = hl Syntax "of"
returnD = hl Syntax "return"
@ -123,7 +124,8 @@ export
prettyArms : PrettyHL a => Pretty.HasEnv m =>
List (SnocList BaseName, Doc HL, a) -> m (Doc HL)
prettyArms =
map (braces . asep) . traverse (\(xs, l, r) => prettyArm T xs l r)
map (braces . aseparate semiD) .
traverse (\(xs, l, r) => prettyArm T xs l r)
export
prettyCase : PrettyHL a => PrettyHL b => PrettyHL c => IsQty q =>