i have this
data Something = Something Integer deriving (MyClass, Show) class MyClass a where hello :: MyClass a => a -> a instance MyClass In
You may want to have a look at the GHC documentation on Generic Programming. You need to create a class that can work on a generic representation of arbitrary types. I don't think the specific example you gave is reasonable for a derivable class.