[Haskell-cafe] ANNOUNCE: uuid-1.2.6

Antoine Latter aslatter at gmail.com
Fri Sep 21 13:38:53 CEST 2012


On Fri, Sep 21, 2012 at 12:30 AM, David Fox <ddssff at gmail.com> wrote:
> I was wondering about this:
>
>   -- My goal with this instance was to make it work just enough to do what
>   -- I want when used with the HStringTemplate library.
>   instance Data UUID where
>       toConstr uu  = mkConstr uuidType (show uu) [] (error "fixity")
>       gunfold _ _  = error "gunfold"
>       dataTypeOf _ = uuidType
>
> Is there any reason not to just say "deriving Data" in the type declaration?
>

I didn't want my 'Data' instance to leak the details of the
constructor. Also I don't know much about how 'Data' works.

I think a similar conversation is going on about the Data declarations
in the 'containers' library.

Antoine



More information about the Haskell-Cafe mailing list