[GHC] #8274: Core pretty-printer doesn't print # on unboxed literals
#8274: Core pretty-printer doesn't print # on unboxed literals ------------------------------------+------------------------------------- Reporter: jstolarek | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: Other Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- I just noticed that Core pretty printer produces something like this (this is part of expected output for T3772 in testsuite): {{{ case GHC.Prim.<=# n# 0 of _ { __DEFAULT -> xs n#; 1 -> GHC.Tuple.() } }}} Both `0` (in scrutinee) and `1` (one of branch alternatives) are unboxed values, so they should be printed as `0#` and `1#` respectively. I haven't checked whether unboxed literals of other types (`Word`, `Double`, `Float`) are printed in that way, but I would guess that yes. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8274> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8274: Core pretty-printer doesn't print # on unboxed literals -------------------------------------+------------------------------------ Reporter: jstolarek | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by simonpj): The counter-argument would be that Core has no ''boxed'' literals, so the # is redundant. But I don't mind either way. So, by all means make it so, if you think it woudl be helpful. Thanks. Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8274#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8274: Core pretty-printer doesn't print # on unboxed literals -------------------------------------+------------------------------------ Reporter: jstolarek | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by jstolarek): * type: bug => feature request -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8274#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8274: Core pretty-printer doesn't print # on unboxed literals -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: Type: feature | Status: new request | Milestone: Priority: normal | Version: 7.7 Component: Compiler | Keywords: newcomer Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Other | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by jstolarek): * keywords: => newcomer -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8274#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8274: Core pretty-printer doesn't print # on unboxed literals -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: detrumi Type: feature | Status: new request | Milestone: Priority: normal | Version: 7.7 Component: Compiler | Keywords: newcomer Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Other | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by detrumi): * owner: => detrumi -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8274#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8274: Core pretty-printer doesn't print # on unboxed literals -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: Type: feature | Status: new request | Milestone: Priority: normal | Version: 7.7 Component: Compiler | Keywords: newcomer Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Other | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by detrumi): * owner: detrumi => -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8274#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8274: Core pretty-printer doesn't print # on unboxed literals -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Other | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #10104 | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * related: => #10104 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8274#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8274: Core pretty-printer doesn't print # on unboxed literals -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Other | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #10104 | simplCore/should_compile/T8274 | Blocking: | Differential Revisions: Phab:D678 -------------------------------------+------------------------------------- Changes (by thomie): * status: new => patch * testcase: => simplCore/should_compile/T8274 * differential: => Phab:D678 * type: feature request => bug * milestone: => 7.12.1 Comment: There is one small design decision to be made, and that is how to pretty print `Integer`s. Currently, unboxed `Int`s are printed as is, and `Integer`s are prepended with `__integer`. In my patch, I changed this to: unboxed `Int`s are appended with `'#'`, and `Integer`s are printed as is. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8274#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8274: Core pretty-printer doesn't print # on unboxed literals -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Other | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #10104 | simplCore/should_compile/T8274 | Blocking: | Differential Revisions: Phab:D678 -------------------------------------+------------------------------------- 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/8274#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8274: Core pretty-printer doesn't print # on unboxed literals -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Other | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #10104 | simplCore/should_compile/T8274 | Blocking: | Differential Revisions: Phab:D678 -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: patch => closed * resolution: => fixed Comment: Merged, thanks! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8274#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC