Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20260331
# version: 0.19.20260622
#
# REGENDATA ("0.19.20260331",["github","cabal.project"])
# REGENDATA ("0.19.20260622",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-docspec
cabal-docspec --version
- name: checkout
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: restore cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand Down Expand Up @@ -324,7 +324,7 @@ jobs:
$CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='aeson +ordered-keymap' all
- name: save cache
if: always()
uses: actions/cache/save@v4
uses: actions/cache/save@v5
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
10 changes: 5 additions & 5 deletions examples/src/Twitter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ module Twitter
) where

import Control.DeepSeq
import Data.Data (Typeable, Data)
import Data.Data (Data)
import Data.Int (Int64)
import Data.Text (Text)
import GHC.Generics (Generic)

newtype Metadata = Metadata {
result_type :: Text
} deriving (Eq, Show, Typeable, Data, Generic)
} deriving (Eq, Show, Data, Generic)

instance NFData Metadata

data Geo = Geo {
type_ :: Text
, coordinates :: (Double, Double)
} deriving (Eq, Show, Typeable, Data, Generic)
} deriving (Eq, Show, Data, Generic)

instance NFData Geo

Expand All @@ -53,7 +53,7 @@ data Story = Story {
, iso_language_code :: Text
, to_user_id_str :: Maybe Text
, source :: Text
} deriving (Show, Typeable, Data, Generic)
} deriving (Show, Data, Generic)

instance NFData Story

Expand All @@ -69,6 +69,6 @@ data Result = Result {
, since_id_str :: Text
, max_id_str :: Text
, query :: Text
} deriving (Show, Typeable, Data, Generic)
} deriving (Show, Data, Generic)

instance NFData Result
3 changes: 1 addition & 2 deletions src/Data/Aeson/Encoding/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ import qualified Data.Text.Short as ST
newtype Encoding' tag = Encoding {
fromEncoding :: Builder
-- ^ Acquire the underlying bytestring builder.
} deriving (Typeable)
}

-- | Often used synonym for 'Encoding''.
type Encoding = Encoding' Value
Expand Down Expand Up @@ -128,7 +128,6 @@ instance IsString (Encoding' a) where
-- > toEncoding (Person name age) = pairs ("name" .= name <> "age" .= age)
data Series = Empty
| Value (Encoding' Series)
deriving (Typeable)

pair :: Key -> Encoding -> Series
pair name val = pair' (key name) val
Expand Down
1 change: 0 additions & 1 deletion src/Data/Aeson/Internal/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import Data.Semigroup as X (Semigroup (..))
import Data.String as X (IsString(..))
import Data.Text as X (Text)
import Data.Time as X (UTCTime)
import Data.Typeable as X (Typeable)
import Data.Vector as X (Vector)
import Data.Void as X (Void, absurd)
import Data.Word as X (Word8, Word16, Word32, Word64)
Expand Down
3 changes: 1 addition & 2 deletions src/Data/Aeson/Key.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import Data.Monoid (Monoid(mempty, mappend))
import Data.Semigroup (Semigroup((<>)))
import Data.Text (Text)
import Data.Type.Coercion (Coercion (..))
import Data.Typeable (Typeable)
import Text.Read (Read (..))

import qualified Data.String
Expand All @@ -42,7 +41,7 @@ import qualified Language.Haskell.TH.Syntax as TH
import qualified Test.QuickCheck as QC

newtype Key = Key { unKey :: Text }
deriving (Typeable, Data)
deriving (Data)

fromString :: String -> Key
fromString = Key . T.pack
Expand Down
5 changes: 2 additions & 3 deletions src/Data/Aeson/KeyMap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ import Data.Semigroup (Semigroup((<>)))
import Data.Text (Text)
import Data.These (These (..))
import Data.Type.Coercion (Coercion (..))
import Data.Typeable (Typeable)
import Text.Read (Read (..), Lexeme(..), readListPrecDefault, prec, lexP, parens)

import qualified Data.Aeson.Key as Key
Expand All @@ -141,7 +140,7 @@ import qualified Witherable as W

-- | A map from JSON key type 'Key' to 'v'.
newtype KeyMap v = KeyMap { unKeyMap :: Map Key v }
deriving (Eq, Ord, Typeable, Data, Functor)
deriving (Eq, Ord, Data, Functor)


-- | Construct an empty map.
Expand Down Expand Up @@ -355,7 +354,7 @@ import Prelude (fst)

-- | A map from JSON key type 'Key' to 'v'.
newtype KeyMap v = KeyMap { unKeyMap :: HashMap Key v }
deriving (Eq, Ord, Typeable, Data, Functor)
deriving (Eq, Ord, Data, Functor)

-- | Construct an empty map.
empty :: KeyMap v
Expand Down
10 changes: 5 additions & 5 deletions src/Data/Aeson/Types/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,18 @@ data JSONPathElement = Key Key
| Index {-# UNPACK #-} !Int
-- ^ JSON path element of an index into an
-- array, \"array[index]\".
deriving (Eq, Show, Typeable, Ord)
deriving (Eq, Show, Ord)
type JSONPath = [JSONPathElement]

-- | The internal result of running a 'Parser'.
data IResult a = IError JSONPath String
| ISuccess a
deriving (Eq, Show, Typeable)
deriving (Eq, Show)

-- | The result of running a 'Parser'.
data Result a = Error String
| Success a
deriving (Eq, Show, Typeable)
deriving (Eq, Show)

instance NFData JSONPathElement where
rnf (Key t) = rnf t
Expand Down Expand Up @@ -369,7 +369,7 @@ data Value = Object !Object
| Number !Scientific
| Bool !Bool
| Null
deriving (Eq, Read, Typeable, Data, Generic)
deriving (Eq, Read, Data, Generic)

-- | Since version 1.5.6.0 version object values are printed in lexicographic key order
--
Expand Down Expand Up @@ -505,7 +505,7 @@ deriving instance Ord Value
newtype DotNetTime = DotNetTime {
fromDotNetTime :: UTCTime
-- ^ Acquire the underlying value.
} deriving (Eq, Ord, Read, Show, Typeable, FormatTime)
} deriving (Eq, Ord, Read, Show, FormatTime)

instance NFData Value where
rnf (Object o) = rnf o
Expand Down
2 changes: 1 addition & 1 deletion tests/PropUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import Prelude.Compat

import Data.Aeson (eitherDecode, encode)
import Data.Aeson.Encoding (encodingToLazyByteString)
import Data.Aeson.Types
import Data.Aeson.Types hiding (isEmptyArray)
import qualified Data.Aeson.Key as Key
import qualified Data.Aeson.KeyMap as KM
import Data.HashMap.Strict (HashMap)
Expand Down
15 changes: 7 additions & 8 deletions tests/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,32 @@ data Foo = Foo {
-- This definition causes an infinite loop in genericTo and genericFrom!
-- , fooMap :: Map.Map String Foo
, fooMap :: Map.Map String (Text,Int)
} deriving (Show, Typeable, Data)
} deriving (Show, Data)

data UFoo = UFoo {
_UFooInt :: Int
, uFooInt :: Int
} deriving (Show, Eq, Data, Typeable)
} deriving (Show, Eq, Data)

data NoConstructors

data OneConstructor = OneConstructor
deriving (Show, Eq, Typeable, Data)
deriving (Show, Eq, Data)

data Product2 a b = Product2 a b
deriving (Show, Eq, Typeable, Data)
deriving (Show, Eq, Data)

data Product6 a b c d e f = Product6 a b c d e f
deriving (Show, Eq, Typeable, Data)
deriving (Show, Eq, Data)

data Sum4 a b c d = Alt1 a | Alt2 b | Alt3 c | Alt4 d
deriving (Show, Eq, Typeable, Data)
deriving (Show, Eq, Data)

class ApproxEq a where
(=~) :: a -> a -> Bool

newtype Approx a = Approx { fromApprox :: a }
deriving (Show, Data, Typeable, ApproxEq, Num)
deriving (Show, Data, ApproxEq, Num)

instance (ApproxEq a) => Eq (Approx a) where
Approx a == Approx b = a =~ b
Expand All @@ -93,7 +93,6 @@ data EitherTextInt

data GADT a where
GADT :: { gadt :: String } -> GADT String
deriving Typeable

deriving instance Data (GADT String)
deriving instance Eq (GADT a)
Expand Down