Cannot get Typeable for related data families
I am trying to get
for a related dataset like this:
LANGUAGE DeriveDataTypeable #-} LANGUAGE TypeFamilies #-} module Test where import Data.Typeable class Test a where data DTest a :: * instance Test () where data DTest () = Foo deriving Typeable
But I am getting the following error, and it leaves me a bit puzzled:
[1 of 1] Compiling Test ( test.hs, test.o ) test.hs:12:14: Cannot eta-reduce to an instance of form instance (...) => Typeable DTest In the data instance declaration for ‘DTest’
Who can tell what is going wrong here?
source to share