diff --git a/uuid-types/Data/UUID/Types/Internal.hs b/uuid-types/Data/UUID/Types/Internal.hs index 2f72d22..994fd68 100644 --- a/uuid-types/Data/UUID/Types/Internal.hs +++ b/uuid-types/Data/UUID/Types/Internal.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE DeriveDataTypeable, TypeFamilies, CPP #-} +{-# LANGUAGE DeriveDataTypeable, TypeFamilies, CPP, DeriveGeneric #-} {-# OPTIONS_HADDOCK hide #-} -- | @@ -47,6 +47,7 @@ import Data.Bits import Data.Hashable import Data.List (elemIndices) import Foreign.Ptr (Ptr) +import GHC.Generics (Generic) #if MIN_VERSION_base(4,0,0) import Data.Data @@ -81,7 +82,8 @@ data UUID {-# UNPACK #-} !Word32 {-# UNPACK #-} !Word32 {-# UNPACK #-} !Word32 - deriving (Eq, Ord, Typeable) + deriving (Eq, Generic, Ord, Typeable) + {- Other representations that we tried are: Mimic V1 structure: !Word32 !Word16 !Word16 !Word16 diff --git a/uuid-types/uuid-types.cabal b/uuid-types/uuid-types.cabal index 32c4bea..1584b8f 100644 --- a/uuid-types/uuid-types.cabal +++ b/uuid-types/uuid-types.cabal @@ -29,6 +29,8 @@ Source-Repository head Subdir: uuid-types Library + if impl(ghc) + Build-Depends: ghc-prim Build-Depends: base >= 3 && < 5, binary >= 0.4 && < 0.9, bytestring >= 0.9 && < 0.11,