diff --git a/src/Juvix/Compiler/Concrete/Print/Base.hs b/src/Juvix/Compiler/Concrete/Print/Base.hs index 6705bd5631..b1677237da 100644 --- a/src/Juvix/Compiler/Concrete/Print/Base.hs +++ b/src/Juvix/Compiler/Concrete/Print/Base.hs @@ -783,7 +783,7 @@ instance SingI s => PrettyPrint (InductiveConstructorDef s) where constructorType' = ppExpressionType _constructorType doc' = ppCode <$> _constructorDoc pragmas' = ppCode <$> _constructorPragmas - nest (pipeHelper <+> doc' ?<> pragmas' ?<> constructorName' <+> ppCode _constructorColonKw <+> constructorType') + pipeHelper <+> nest (doc' ?<> pragmas' ?<> constructorName' <+> ppCode _constructorColonKw <+> constructorType') where -- we use this helper so that comments appear before the first optional pipe if the pipe was omitted pipeHelper :: Sem r () @@ -821,7 +821,7 @@ instance SingI s => PrettyPrint (InductiveDef s) where ?<> sig' <+> ppCode _inductiveAssignKw <> line - <> (indent . align) constrs' + <> indent constrs' where ppConstructorBlock :: NonEmpty (InductiveConstructorDef s) -> Sem r () ppConstructorBlock cs = vsep (ppCode <$> cs) diff --git a/tests/positive/Format.juvix b/tests/positive/Format.juvix index fc152e94b1..4f31995d1e 100644 --- a/tests/positive/Format.juvix +++ b/tests/positive/Format.juvix @@ -212,11 +212,11 @@ module Comments; type color : Type := -- comment before pipe - | black : color + | black : color | white : color | red : color -- comment before pipe - | blue : color; + | blue : color; axiom a5 : Type;