Skip to content

Commit

Permalink
Merge pull request #81 from LeapYear/nightly
Browse files Browse the repository at this point in the history
Bump nightly versions
  • Loading branch information
brandon-leapyear committed Feb 14, 2022
2 parents 794a48c + b786831 commit 59b8a4b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Upcoming

## 1.3.5.1

* Fix benchmarks for `aeson-2`

## 1.3.5

* Support `aeson-2.0.0.0`
Expand Down
2 changes: 1 addition & 1 deletion aeson-schemas.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: >= 1.10
-- see: https://github.com/sol/hpack

name: aeson-schemas
version: 1.3.5
version: 1.3.5.1
synopsis: Easily consume JSON data on-demand with type-safety
description: Parse JSON data easily and safely without defining new data types. Useful
for deeply nested JSON data, which is difficult to parse using the default
Expand Down
11 changes: 5 additions & 6 deletions bench/Benchmarks/Data/Objects.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ module Benchmarks.Data.Objects where

import Data.Aeson (ToJSON (..), Value)
import Data.Dynamic (Dynamic, Typeable, toDyn)
import qualified Data.HashMap.Strict as HashMap
import Data.Proxy (Proxy (..))
import Data.Text (Text)
import qualified Data.Text as Text
import Data.String (fromString)

import Data.Aeson.Schema.Internal (Object (..), SchemaResult)
import Data.Aeson.Schema.Key (IsSchemaKey, SchemaKey, fromSchemaKey)
Expand All @@ -26,6 +24,7 @@ import Data.Aeson.Schema.Type (
ToSchemaObject,
)
import Data.Aeson.Schema.Utils.All (All (..))
import qualified Data.Aeson.Schema.Utils.Compat as Compat

type MockSchema schema =
( MockSchemaResult (ToSchemaObject schema)
Expand All @@ -52,10 +51,10 @@ instance
) =>
MockSchemaResult ( 'SchemaObject pairs)
where
schemaResult _ = UnsafeObject $ HashMap.fromList $ mapAll @MockSchemaResultPair @pairs schemaResultPair
schemaResult _ = UnsafeObject $ Compat.fromList $ mapAll @MockSchemaResultPair @pairs schemaResultPair

class MockSchemaResultPair (pair :: (SchemaKey, SchemaType)) where
schemaResultPair :: Proxy pair -> (Text, Dynamic)
schemaResultPair :: Proxy pair -> (Compat.Key, Dynamic)

instance (IsSchemaKey key, MockSchemaResult inner) => MockSchemaResultPair '(key, inner) where
schemaResultPair _ = (Text.pack $ fromSchemaKey @key, toDyn $ schemaResult $ Proxy @inner)
schemaResultPair _ = (fromString $ fromSchemaKey @key, toDyn $ schemaResult $ Proxy @inner)
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: aeson-schemas
version: 1.3.5
version: 1.3.5.1
verbatim:
cabal-version: '>= 1.10'
license: BSD3
Expand Down
5 changes: 1 addition & 4 deletions stack-ghc-9.0.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
resolver: nightly-2021-11-19

extra-deps:
- aeson-2.0.0.0
resolver: nightly-2022-02-14

ghc-options:
'$locals': -Werror
10 changes: 1 addition & 9 deletions stack-ghc-9.2.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
resolver: nightly-2021-11-19
resolver: nightly-2022-02-14
compiler: ghc-9.2.1

extra-deps:
- aeson-2.0.2.0
- attoparsec-0.14.2
- base-compat-0.12.1
- base-compat-batteries-0.12.1
- hint-0.9.0.5
# https://github.com/DanBurton/haskell-src-meta/pull/23
- github: DanBurton/haskell-src-meta
commit: 3f521f9f14d0bd135d352dc8fae19151b6077f77
subdirs:
- haskell-src-meta

ghc-options:
'$locals': -Werror

0 comments on commit 59b8a4b

Please sign in to comment.