
Hi folks, I'm happy to announce a new point release of the uuid library, 1.2.6: http://hackage.haskell.org/package/uuid-1.2.6 The 'uuid' package implements most of RFC 4122[1] including random generation and generation based on hardware MAC addresses. I haven't announced a point-release in a while. The changes since 1.2.1 include: * When generating UUIDs from the hardware MAC address, if the MAC address is not available we now use a random seed for our (hidden, global) state machine * The 'Read' instance now drops leading spaces * Added the functions 'toWords' and 'fromWords', primary to support the package uuid-quasi[2]. Take care, Antoine 1: http://tools.ietf.org/html/rfc4122 2: http://hackage.haskell.org/package/uuid-quasi

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?
On Wed, Jun 13, 2012 at 8:59 PM, Antoine Latter
Hi folks,
I'm happy to announce a new point release of the uuid library, 1.2.6:
http://hackage.haskell.org/package/uuid-1.2.6
The 'uuid' package implements most of RFC 4122[1] including random generation and generation based on hardware MAC addresses.
I haven't announced a point-release in a while. The changes since 1.2.1 include:
* When generating UUIDs from the hardware MAC address, if the MAC address is not available we now use a random seed for our (hidden, global) state machine
* The 'Read' instance now drops leading spaces
* Added the functions 'toWords' and 'fromWords', primary to support the package uuid-quasi[2].
Take care, Antoine
1: http://tools.ietf.org/html/rfc4122 2: http://hackage.haskell.org/package/uuid-quasi
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Fri, Sep 21, 2012 at 12:30 AM, David Fox
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
participants (2)
-
Antoine Latter
-
David Fox