[GHC] #10868: Make GHC generics capable of handling unboxed types
GHC
ghc-devs at haskell.org
Sat Oct 3 18:01:24 UTC 2015
#10868: Make GHC generics capable of handling unboxed types
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: RyanGlScott
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #8468 | Differential Rev(s): Phab:D1239
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"6cde981a8788b225819be28659caddc35b77972d/ghc" 6cde981/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="6cde981a8788b225819be28659caddc35b77972d"
Make GHC generics capable of handling unboxed types
This adds a data family (`URec`) and six data family instances (`UAddr`,
`UChar`, `UDouble`, `UFloat`, `UInt`, and `UWord`) which a `deriving
Generic(1)` clause will generate if it sees `Addr#`, `Char#`, `Double#`,
`Float#`, `Int#`, or `Word#`, respectively. The programmer can then
provide instances for these data family instances to provide custom
implementations for unboxed types, similar to how derived `Eq`, `Ord`,
and `Show` instances currently special-case unboxed types.
Fixes #10868.
Test Plan: ./validate
Reviewers: goldfire, dreixel, bgamari, austin, hvr, kosmikus
Reviewed By: dreixel, kosmikus
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D1239
GHC Trac Issues: #10868
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10868#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list