on master help sign in
used a more specific PP rendering to revert the changes to SS.Type pretty
commit0cd2af27a6f16f3d1633f4c36f8c6bf7ec1887ea authorJohn P Mayer Jr <john.p.mayer.jr@gmail.com> dateWed 15 Jan 2014, 19:46 (13 years ago) parentd647bfd
2 files changed+3−2
compiler/SourceSyntax/Type.hs+1−1 tests/Tests/Property.hs+2−1
compiler/SourceSyntax/Type.hs+1−1
@@ -33,7 +33,7 @@ instance Show Type where
3333instance Pretty Type where
3434 pretty tipe =
3535 case tipe of
36− Lambda _ _ -> P.hsep [ t, P.hsep (map (P.text "->" <+>) ts) ]
36+ Lambda _ _ -> P.sep [ t, P.sep (map (P.text "->" <+>) ts) ]
3737 where
3838 t:ts = map prettyLambda (collectLambdas tipe)
3939 prettyLambda t = case t of
tests/Tests/Property.hs+2−1
@@ -7,6 +7,7 @@ import Test.Framework.Providers.QuickCheck2
77import Test.HUnit (assert)
88import Test.QuickCheck
99import Text.Parsec.Combinator (eof)
10+import Text.PrettyPrint as P
1011
1112import SourceSyntax.Literal as Lit
1213import SourceSyntax.Pattern as Pat
@@ -50,4 +51,4 @@ prop_parse_print p x =
5051 either (const False) (== x) . parse_print p $ x
5152
5253parse_print :: (Pretty a) => IParser a -> a -> Either String a
53−parse_print p = either (Left . show) (Right) . iParse (p <* eof) . show . pretty
54+parse_print p = either (Left . show) (Right) . iParse (p <* eof) . P.renderStyle P.style {mode=P.LeftMode} . pretty