on master help sign in
used a more specific PP rendering to revert the changes to SS.Type pretty
0cd2af2John P Mayer Jr
compiler/SourceSyntax/Type.hs+1−1
@@ -33,7 +33,7 @@ instance Show Type where
33instance Pretty Type where
33instance Pretty Type where
34 pretty tipe =
34 pretty tipe =
35 case tipe of
35 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) ]
37 where
37 where
38 t:ts = map prettyLambda (collectLambdas tipe)
38 t:ts = map prettyLambda (collectLambdas tipe)
39 prettyLambda t = case t of
39 prettyLambda t = case t of
tests/Tests/Property.hs+2−1
@@ -7,6 +7,7 @@ import Test.Framework.Providers.QuickCheck2
7import Test.HUnit (assert)
7import Test.HUnit (assert)
8import Test.QuickCheck
8import Test.QuickCheck
9import Text.Parsec.Combinator (eof)
9import Text.Parsec.Combinator (eof)
10+import Text.PrettyPrint as P
10
11
11import SourceSyntax.Literal as Lit
12import SourceSyntax.Literal as Lit
12import SourceSyntax.Pattern as Pat
13import SourceSyntax.Pattern as Pat
@@ -50,4 +51,4 @@ prop_parse_print p x =
50 either (const False) (== x) . parse_print p $ x
51 either (const False) (== x) . parse_print p $ x
51
52
52parse_print :: (Pretty a) => IParser a -> a -> Either String a
53parse_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