
#9220: type roles for unboxed arrays -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Core | Version: 7.8.1 Libraries | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by simonpj): Just to be clear, what exactly is "the fix" you mention? * What roles are you proposing for arrays of various sorts? * What goes wrong with the above instance? Is it rejecting a program that is bogus, or is it rejecting a program that "ought" to be ok? Incidentally, I think it should ''definitely'' be part of the contract for `Storable` that `sizeOf` should return the same result for a newtype as for the type it wraps. Thus this would be BAD: {{{ newtype N = MkN T instance Storable T where sizeOf _ = 4 instance Storable N where sizeOf _ = 8 }}} If `N` and `T` are representationally equaly, how could they take a different number of bytes to represent. That should be part of the documentation for `Storable`. I believe this is what Reid was saying in comment:8. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9220#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler