[GHC] #10104: Show '#' on unboxed literals
#10104: Show '#' on unboxed literals -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: feature | Status: new request | Milestone: 7.12.1 Priority: normal | Version: 7.8.4 Component: Compiler | Operating System: Unknown/Multiple Keywords: | Type of failure: None/Unknown Architecture: | Blocked By: Unknown/Multiple | Related Tickets: #8274 Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Currently, unboxed literals are shown in the same way as boxed literals (without #): {{{ Prelude> :set -XMagicHash Prelude> :m GHC.Prim Prelude GHC.Prim> data T = MkT Int# deriving Show Prelude GHC.Prim> MkT 3# MkT 3 }}} It would be nice if this would show `MkT 3#` instead. I have a patch. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10104> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10104: Show '#' on unboxed literals -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #8274 | Blocking: | Differential Revisions: Phab:D672 -------------------------------------+------------------------------------- Changes (by thomie): * status: new => patch * differential: => Phab:D672 Comment: Also handle `Char#`, `Word#`, `Float#` and `Double#`. And don't show superfluous parenthesis around negative unboxed literals. For reference: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/syntax- extns.html#magic-hash -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10104#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10104: Show '#' on unboxed literals -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #8274 | deriving/should_run/T10104 | Blocking: | Differential Revisions: Phab:D672 -------------------------------------+------------------------------------- Changes (by thomie): * testcase: => deriving/should_run/T10104 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10104#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10104: Show '#' on unboxed literals -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #8274 | deriving/should_run/T10104 | Blocking: | Differential Revisions: Phab:D672 -------------------------------------+------------------------------------- Comment (by Austin Seipp <austin@…>): In [changeset:"47175e06ff8364c732607e3d76ef3b7b80d57f1c/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="47175e06ff8364c732607e3d76ef3b7b80d57f1c" Show '#' on unboxed literals Test Plan: deriving/should_run/T10104 Reviewers: austin, jstolarek Reviewed By: austin, jstolarek Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D672 GHC Trac Issues: #10104 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10104#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10104: Show '#' on unboxed literals -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.4 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #8274 | deriving/should_run/T10104 | Blocking: | Differential Revisions: Phab:D672 -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: patch => closed * type: feature request => bug * resolution: => fixed Comment: Merged, thanks! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10104#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10104: Show '#' on unboxed literals -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.4 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #8274 | deriving/should_run/T10104 | Blocking: | Differential Revisions: Phab:D672 -------------------------------------+------------------------------------- Comment (by Austin Seipp <austin@…>): In [changeset:"89458eba5721de1b6b3378415f26e110bab8cc0f/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="89458eba5721de1b6b3378415f26e110bab8cc0f" Pretty-print # on unboxed literals in core Summary: Ticket #10104 dealt with showing the '#'s on types with unboxed fields. This commit pretty prints the '#'s on unboxed literals in core output. Test Plan: simplCore/should_compile/T8274 Reviewers: jstolarek, simonpj, austin Reviewed By: simonpj, austin Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D678 GHC Trac Issues: #8274 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10104#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC