Skip to content

Commit

Permalink
Require indent after 'where' in GADTs
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPenner committed Feb 12, 2025
1 parent 4ae0194 commit d057a12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parser-typechecker/src/Unison/Syntax/DeclPrinter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ prettyGADT ::
DataDeclaration v a ->
Pretty SyntaxText
prettyGADT env ctorType r name dd =
P.hang header . P.lines $
constructor <$> zip [0 ..] (DD.constructors' dd)
header <> P.newline <> P.indentN 2 constructors
where
constructors = P.lines (constructor <$> zip [0 ..] (DD.constructors' dd))
constructor (n, (_, _, t)) =
prettyPattern (PPED.unsuffixifiedPPE env) ctorType name (ConstructorReference r n)
<> fmt S.TypeAscriptionColon " :"
Expand Down

0 comments on commit d057a12

Please sign in to comment.