[First documentation on stand-alone instance deriving. bjorn@bringert.net**20060919010606] { hunk ./docs/users_guide/glasgow_exts.xml 3729 + + +Stand-alone deriving declarations + + +GHC now allows stand-alone deriving declarations: + + + + data Foo = Bar Int | Baz String + + deriving Eq for Foo + + +Deriving instances of multi-parameter type classes for newtypes is +also allowed: + + + newtype Foo a = MkFoo (State Int a) + + deriving (MonadState Int) for Foo + + + + + + }