[GHC] #9220: type roles for unboxed arrays
GHC
ghc-devs at haskell.org
Mon Nov 10 22:43:22 UTC 2014
#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 goldfire):
Sorry for missing the second question.
If we change roles from representational to nominal, then some uses of GND
will no longer type check. This is correct behavior. With `UArray` having
its representational role back, the code in comment:11 will type check.
I think a fuller answer is that, according to Reid's analysis in
comment:3, we don't want to be able to coerce a `StorableArray i Int` to a
`StorableArray i Age`, because `Age` and `Int` might have different
`Storable` instances. So, if GND fails, that's correct behavior.
In any case, I will wait for Reid (or someone else knowledgeable about
`array`) to give explicit instructions on what to do.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9220#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list