[GHC] #13699: Pretty printing: Strict record fields are not parenthesized properly
GHC
ghc-devs at haskell.org
Sun May 14 19:26:46 UTC 2017
#13699: Pretty printing: Strict record fields are not parenthesized properly
-------------------------------------+-------------------------------------
Reporter: zyla | Owner: (none)
Type: bug | Status: new
Priority: low | Milestone:
Component: GHCi | Version: 8.0.1
Keywords: pretty-print | Operating System: Unknown/Multiple
bang record |
Architecture: | Type of failure: Other
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
When I type in GHCi:
{{{
λ> data Foo = Foo { x :: !(Maybe Int) }
λ> :i Foo
data Foo = Foo {x :: !Maybe Int} -- Defined at <interactive>:71:1
}}}
But this is not legal Haskell syntax:
{{{
λ> data Foo = Foo {x :: !Maybe Int}
<interactive>:73:22: error:
• Unexpected strictness annotation: !Maybe
• In the type ‘!Maybe Int’
In the definition of data constructor ‘Foo’
In the data declaration for ‘Foo’
}}}
I think it should be pretty printed with parens:
{{{
λ> :i Foo
data Foo = Foo {x :: !(Maybe Int)} -- Defined at <interactive>:71:1
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13699>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list