
#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