[GHC] #12478: Template Haskell support for unboxed sums
#12478: Template Haskell support for unboxed sums -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: feature | Status: new request | Priority: normal | Milestone: 8.2.1 Component: Template | Version: 8.1 Haskell | Keywords: | Operating System: Unknown/Multiple TemplateHaskell | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Currently, you can't use unboxed sums with Template Haskell. This makes me sad. Patch incoming. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12478> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12478: Template Haskell support for unboxed sums -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 8.2.1 Component: Template Haskell | Version: 8.1 Resolution: | Keywords: | TemplateHaskell Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2448 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D2448 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12478#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12478: Template Haskell support for unboxed sums -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 8.2.1 Component: Template Haskell | Version: 8.1 Resolution: | Keywords: | TemplateHaskell Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2448 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"613d745523f181991f6f916bbe58082b7970f7e6/ghc" 613d7455/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="613d745523f181991f6f916bbe58082b7970f7e6" Template Haskell support for unboxed sums This adds new constructors `UnboxedSumE`, `UnboxedSumT`, and `UnboxedSumP` to represent unboxed sums in Template Haskell. One thing you can't currently do is, e.g., `reify ''(#||#)`, since I don't believe unboxed sum type/data constructors can be written in prefix form. I will look at fixing that as part of #12514. Fixes #12478. Test Plan: make test TEST=T12478_{1,2,3} Reviewers: osa1, goldfire, austin, bgamari Reviewed By: goldfire, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2448 GHC Trac Issues: #12478 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12478#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12478: Template Haskell support for unboxed sums -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 8.2.1 Component: Template Haskell | Version: 8.1 Resolution: fixed | Keywords: | TemplateHaskell Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | th/T12478_{1,2,3,4} Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2448 Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * status: patch => closed * testcase: => th/T12478_{1,2,3,4} * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12478#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12478: Template Haskell support for unboxed sums -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 8.2.1 Component: Template Haskell | Version: 8.1 Resolution: fixed | Keywords: | TemplateHaskell Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | th/T12478_{1,2,3,4} Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2448, Wiki Page: | Phab:D2854 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * differential: Phab:D2448 => Phab:D2448, Phab:D2854 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12478#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12478: Template Haskell support for unboxed sums -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 8.2.1 Component: Template Haskell | Version: 8.1 Resolution: fixed | Keywords: | TemplateHaskell Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | th/T12478_{1,2,3,4} Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2448, Wiki Page: | Phab:D2854 -------------------------------------+------------------------------------- Comment (by Ryan Scott <ryan.gl.scott@…>): In [changeset:"b5d788aa0e73fdf22cca3f88962e7652b07073cc/ghc" b5d788aa/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="b5d788aa0e73fdf22cca3f88962e7652b07073cc" Introduce unboxedSum{Data,Type}Name to template-haskell Summary: In D2448 (which introduced Template Haskell support for unboxed sums), I neglected to add `unboxedSumDataName` and `unboxedSumTypeName` functions, since there wasn't any way you could write unboxed sum data or type constructors in prefix form to begin with (see #12514). But even if you can't write these `Name`s directly in source code, it would still be nice to be able to use these `Name`s in Template Haskell (for instance, to be able to treat unboxed sum type constructors like any other type constructors). Along the way, this uncovered a minor bug in `isBuiltInOcc_maybe` in `TysWiredIn`, which was calculating the arity of unboxed sum data constructors incorrectly. Test Plan: make test TEST=T12478_5 Reviewers: osa1, goldfire, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2854 GHC Trac Issues: #12478, #12514 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12478#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12478: Template Haskell support for unboxed sums -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: feature request | Status: closed Priority: normal | Milestone: 8.2.1 Component: Template Haskell | Version: 8.1 Resolution: fixed | Keywords: | TemplateHaskell, UnboxedSums Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | th/T12478_{1,2,3,4} Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2448, Wiki Page: | Phab:D2854 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * keywords: TemplateHaskell => TemplateHaskell, UnboxedSums -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12478#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC