[GHC] #7643: Kind application error
GHC
cvs-ghc at haskell.org
Wed Feb 6 13:50:01 CET 2013
#7643: Kind application error
----------------------------------------+-----------------------------------
Reporter: gmainland | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 7.6.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: #7354 |
----------------------------------------+-----------------------------------
Changes (by simonpj):
* difficulty: => Unknown
Comment:
There really is an underlying issue here, about how inference interacts
with sub-kinding. Sigh.
It is shown up here becuase you are doing `unsafeCoerce#` on an unlifted
type, which is a deeply dangerous thing to do. Better to do it on a
lifted type.
Try using this definition of `setIntByteArray#`, which actually uses one
fewer `unsafeCoerce#` calls:
{{{
setIntByteArray# :: MutableByteArray# s -> Int# -> Int# -> Int -> State# s
-> State# s
setIntByteArray# arr# i# n# (I# x#) s# =
case unsafeCoerce# (internal (setIntArray# arr# i# n# x#)) s# of
(# s1#, _ #) -> s1#
}}}
That makes the attached `Main.hs` compile fine.
Don't close the ticket though. The underlying problem (dark corner though
it is) remains.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7643#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list