Skip to content

Commit 7018340

Browse files
committed
UUID deriving Generic
1 parent 716d80a commit 7018340

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

uuid-types/Data/UUID/Types/Internal.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, CPP #-}
1+
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, CPP, DeriveGeneric #-}
22
{-# OPTIONS_HADDOCK hide #-}
33

44
-- |
@@ -47,6 +47,7 @@ import Data.Bits
4747
import Data.Hashable
4848
import Data.List (elemIndices)
4949
import Foreign.Ptr (Ptr)
50+
import GHC.Generics (Generic)
5051

5152
#if MIN_VERSION_base(4,0,0)
5253
import Data.Data
@@ -81,7 +82,8 @@ data UUID
8182
{-# UNPACK #-} !Word32
8283
{-# UNPACK #-} !Word32
8384
{-# UNPACK #-} !Word32
84-
deriving (Eq, Ord, Typeable)
85+
deriving (Eq, Generic, Ord, Typeable)
86+
8587
{-
8688
Other representations that we tried are:
8789
Mimic V1 structure: !Word32 !Word16 !Word16 !Word16

0 commit comments

Comments
 (0)