Skip to content

Commit

Permalink
UUID deriving Generic
Browse files Browse the repository at this point in the history
  • Loading branch information
pmlodawski committed Jan 10, 2017
1 parent 716d80a commit 66372d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions uuid-types/Data/UUID/Types/Internal.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, CPP #-}
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, CPP, DeriveGeneric #-}
{-# OPTIONS_HADDOCK hide #-}

-- |
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions uuid-types/uuid-types.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 66372d6

Please sign in to comment.