on master help sign in
Derive Generic Value
commitdd909cc2cda092df47cc0f773fe13a51dd578c44 authorlyxia <lysxia@gmail.com> dateSat 6 May 2017, 19:24 (9 years ago) parentd5f41b6
1 file changed+3−1
Data/Aeson/Types/Internal.hs+3−1
Data/Aeson/Types/Internal.hs+3−1
@@ -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)
9293import Data.Time.Format (FormatTime)
9394import Data.Typeable (Typeable)
9495import Data.Vector (Vector)
96+import GHC.Generics (Generic)
9597import qualified Control.Monad.Fail as Fail
9698import qualified Data.HashMap.Strict as H
9799import 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