[GHC] #13498: More storable instances?

GHC ghc-devs at haskell.org
Thu Mar 30 03:18:10 UTC 2017


#13498: More storable instances?
-------------------------------------+-------------------------------------
           Reporter:  wyager         |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:                 |           Version:  8.0.1
  libraries/base                     |
           Keywords:  Storable,      |  Operating System:  Unknown/Multiple
  Foreign, Ptr                       |
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Is it intentional that we don't have {{{Storable}}} instances for ADTs
 like {{{Maybe}}} and {{{Either}}}, nor for things like {{{(,)}}}? This
 approach seems to work:

 https://gist.github.com/wyager/8443c3f5a9fc9b52dc28346bafdf409f

 Basically what the C compiler would do for a {{{union}}} type with a tag.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13498>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list