Yep, that works! Sweet!

On Tue, Jun 5, 2012 at 3:54 PM, Andres Löh <andres@well-typed.com> wrote:
Hi Bryan.

> Yes, I (and I assume Bas) want generalised newtype deriving to work, but it
> doesn't.
>
> I want to write something very simple:
>
> {-# LANGUAGE GeneralizedNewtypeDeriving #-}
> newtype Foo = Foo Int
>     deriving (Eq, Show, Unbox)
>
> But with the above, GHC says:
>
>     No instances for (M.MVector MVector Foo, G.Vector Vector Foo)
>       arising from the 'deriving' clause of a data type declaration

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)

?

Cheers,
 Andres

--
Andres Löh, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com

_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries