[GHC] #13699: Pretty printing: Strict record fields are not parenthesized properly

#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

#13699: Pretty printing: Strict record fields are not parenthesized properly -------------------------------------+------------------------------------- Reporter: zyla | Owner: (none) Type: bug | Status: patch Priority: low | Milestone: Component: GHCi | Version: 8.0.1 Resolution: | Keywords: pretty-print | bang record Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3587 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D3587 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13699#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13699: Pretty printing: Strict record fields are not parenthesized properly
-------------------------------------+-------------------------------------
Reporter: zyla | Owner: (none)
Type: bug | Status: patch
Priority: low | Milestone:
Component: GHCi | Version: 8.0.1
Resolution: | Keywords: pretty-print
| bang record
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3587
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#13699: Pretty printing: Strict record fields are not parenthesized properly -------------------------------------+------------------------------------- Reporter: zyla | Owner: (none) Type: bug | Status: closed Priority: low | Milestone: 8.4.1 Component: GHCi | Version: 8.0.1 Resolution: fixed | Keywords: pretty-print | bang record Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3587 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed * milestone: => 8.4.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13699#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC