[GHC] #9112: support for deriving Vector/MVector instances
GHC
ghc-devs at haskell.org
Sun May 25 03:40:11 UTC 2014
#9112: support for deriving Vector/MVector instances
-------------------------------------+------------------------------------
Reporter: jwlato | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by bitemyapp):
I am trying to build hackage-server on Mac OS X with GHC 7.8 and I was
told this ticket is relevant to my problems.
I've included the build error in this comment.
{{{
When deriving the instance for (VecMut.MVector
VecBase.MVector DocId)
Distribution/Server/Features/Search/DocIdSet.hs:38:13:
Could not coerce from ‘Data.Vector.Primitive.Mutable.MVector
s Word32’ to ‘VecBase.MVector s DocId’
because ‘Data.Vector.Primitive.Mutable.MVector
s Word32’ and ‘VecBase.MVector s DocId’ are different
types.
arising from the coercion of the method ‘VecMut.basicOverlaps’
from type
‘forall s.
VecBase.MVector s Word32 -> VecBase.MVector s Word32
-> Bool’
to type
‘forall s.
VecBase.MVector s DocId -> VecBase.MVector s DocId ->
Bool’
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (VecMut.MVector
VecBase.MVector DocId)
Distribution/Server/Features/Search/DocIdSet.hs:38:13:
Could not coerce from ‘Data.Vector.Primitive.Mutable.MVector
s Word32’ to ‘VecBase.MVector s DocId’
because ‘Data.Vector.Primitive.Mutable.MVector
s Word32’ and ‘VecBase.MVector s DocId’ are different
types.
arising from the coercion of the method ‘VecMut.basicUnsafeSlice’
from type
‘forall s.
Int -> Int -> VecBase.MVector s Word32 ->
VecBase.MVector s Word32’
to type
‘forall s.
Int -> Int -> VecBase.MVector s DocId ->
VecBase.MVector s DocId’
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (VecMut.MVector
VecBase.MVector DocId)
Distribution/Server/Features/Search/DocIdSet.hs:38:13:
Could not coerce from ‘Data.Vector.Primitive.Mutable.MVector
s Word32’ to ‘VecBase.MVector s DocId’
because ‘Data.Vector.Primitive.Mutable.MVector
s Word32’ and ‘VecBase.MVector s DocId’ are different
types.
arising from the coercion of the method ‘VecMut.basicLength’
from type ‘forall s. VecBase.MVector s Word32 -> Int’
to type
‘forall s. VecBase.MVector s DocId -> Int’
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (VecMut.MVector
VecBase.MVector DocId)
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9112#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list