[web-devel] Data and Typeable
Clint Moore
clint at ivy.io
Sat Apr 9 22:16:53 CEST 2011
On Sat, Apr 9, 2011 at 12:13 PM, Michael Snoyman <michael at snoyman.com>wrote:
>
> I definitely don't want to deal with cabal flags for this, it would mean
> that some packages wouldn't install on your system depending on how you
> build Persistent. For your case, it might be acceptable to just use
> standalone deriving declarations, ie:
>
> deriving instance Data SpeciesId
> deriving instance Data Animal
> ...
>
I read the user's guide on how this works, but I think there might be
something going on with the quasiquoter that is preventing it from working.
Or, more probable, I'm doing it wrong.
{-# LANGUAGE StandaloneDeriving #-}
Species
name String Eq
deriving Data Typeable
Animal
species SpeciesId Eq
name String Eq
deriving Data Typeable
deriving instance Data SpeciesId
Any combination that I've tried of 'deriving instance' throws an illegal
type constructor error. Do you happen to have an example of this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110409/939c749d/attachment.htm>
More information about the web-devel
mailing list