Skip to content

Commit 8f246ac

Browse files
authored
Merge pull request #547 from Lysxia/derive-generic
Derive Generic Value
2 parents d5f41b6 + dd909cc commit 8f246ac

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Data/Aeson/Types/Internal.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{-# LANGUAGE CPP #-}
22
{-# LANGUAGE DeriveDataTypeable #-}
3+
{-# LANGUAGE DeriveGeneric #-}
34
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
45
{-# LANGUAGE Rank2Types #-}
56
#if __GLASGOW_HASKELL__ >= 800
@@ -92,6 +93,7 @@ import Data.Time (UTCTime)
9293
import Data.Time.Format (FormatTime)
9394
import Data.Typeable (Typeable)
9495
import Data.Vector (Vector)
96+
import GHC.Generics (Generic)
9597
import qualified Control.Monad.Fail as Fail
9698
import qualified Data.HashMap.Strict as H
9799
import qualified Data.Scientific as S
@@ -342,7 +344,7 @@ data Value = Object !Object
342344
| Number !Scientific
343345
| Bool !Bool
344346
| Null
345-
deriving (Eq, Read, Show, Typeable, Data)
347+
deriving (Eq, Read, Show, Typeable, Data, Generic)
346348

347349
-- | A newtype wrapper for 'UTCTime' that uses the same non-standard
348350
-- serialization format as Microsoft .NET, whose

0 commit comments

Comments
 (0)