
6 Jun
2012
6 Jun
'12
10:44 a.m.
Andres Löh wrote:
Yes, because these are superclasses of Unbox. So can't you simply say this:
newtype Foo = Foo Int deriving (Eq, Show, Unbox, M.MVector MVector, G.Vector Vector)
I don't think this should work. This is the basic set up: class G.Vector v a where basicLength :: v a -> Int ... data family Vector a newtype instance Vector Int = V_Int ... instance G.Vector Vector Int where basicLength (V_Int ...) = ... ... I don't understand what GeneralizedNewtypeDeriving does with deriving(G.Vector Vector) in this situation but it can't possibly do anything sensible without a data instance Vector Foo. The fact that it doesn't fail is just a bug, IMO. Roman