#2700: Template Haskell pretty printer arrow always associates right
---------------------------------------------+------------------------------
Reporter: aprocter | Owner: igloo
Type: merge | Status: new
Priority: normal | Milestone: 6.10.1
Component: Template Haskell | Version: 6.8.3
Severity: normal | Resolution:
Keywords: th pprint pretty print template | Difficulty: Unknown
Testcase: th/T2700 | Architecture: Unknown/Multiple
Os: Unknown/Multiple |
---------------------------------------------+------------------------------
Changes (by igloo):
* milestone: => 6.10.1
Old description:
> When I run a Template Haskell-generated tysig declaration through pprint,
> the associativity for -> comes out incorrectly, e.g.:
>
> sigD (mkName "foo") [t|(Int -> Bool) -> Bool|]
>
> renders as:
>
> foo :: GHC.Base.Int -> GHC.Base.Bool -> GHC.Base.Bool
>
> (note that it's dropping the parens, associating right instead of left)
New description:
When I run a Template Haskell-generated tysig declaration through pprint,
the associativity for -> comes out incorrectly, e.g.:
{{{
sigD (mkName "foo") [t|(Int -> Bool) -> Bool|]
}}}
renders as:
{{{
foo :: GHC.Base.Int -> GHC.Base.Bool -> GHC.Base.Bool
}}}
(note that it's dropping the parens, associating right instead of left)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2700#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs