From 824382ec1aaf0d993e369c6906e09d444f527771 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Thu, 21 Sep 2017 21:42:42 +0300 Subject: [PATCH 1/2] Explicit aeson imports --- src/Data/Swagger/Internal/ParamSchema.hs | 2 +- src/Data/Swagger/Internal/Schema.hs | 2 +- test/Data/Swagger/ParamSchemaSpec.hs | 2 +- test/Data/Swagger/SchemaSpec.hs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Data/Swagger/Internal/ParamSchema.hs b/src/Data/Swagger/Internal/ParamSchema.hs index df5743b..ae4d2cf 100644 --- a/src/Data/Swagger/Internal/ParamSchema.hs +++ b/src/Data/Swagger/Internal/ParamSchema.hs @@ -22,7 +22,7 @@ module Data.Swagger.Internal.ParamSchema where import Control.Lens -import Data.Aeson +import Data.Aeson (ToJSON (..)) import Data.Proxy import GHC.Generics diff --git a/src/Data/Swagger/Internal/Schema.hs b/src/Data/Swagger/Internal/Schema.hs index 37ec7d5..4473fb4 100644 --- a/src/Data/Swagger/Internal/Schema.hs +++ b/src/Data/Swagger/Internal/Schema.hs @@ -32,7 +32,7 @@ import Data.Data.Lens (template) import Control.Monad import Control.Monad.Writer -import Data.Aeson +import Data.Aeson (ToJSON (..), ToJSONKey (..), ToJSONKeyFunction (..), Value (..)) import Data.Char import Data.Data (Data) import Data.Foldable (traverse_) diff --git a/test/Data/Swagger/ParamSchemaSpec.hs b/test/Data/Swagger/ParamSchemaSpec.hs index edde651..aea7390 100644 --- a/test/Data/Swagger/ParamSchemaSpec.hs +++ b/test/Data/Swagger/ParamSchemaSpec.hs @@ -5,7 +5,7 @@ {-# LANGUAGE QuasiQuotes #-} module Data.Swagger.ParamSchemaSpec where -import Data.Aeson +import Data.Aeson (Value) import Data.Aeson.QQ import Data.Char import Data.Proxy diff --git a/test/Data/Swagger/SchemaSpec.hs b/test/Data/Swagger/SchemaSpec.hs index af4641a..6f2ece2 100644 --- a/test/Data/Swagger/SchemaSpec.hs +++ b/test/Data/Swagger/SchemaSpec.hs @@ -8,7 +8,7 @@ import Prelude () import Prelude.Compat import Control.Lens ((^.)) -import Data.Aeson +import Data.Aeson (Value) import Data.Aeson.QQ import Data.Char import qualified Data.HashMap.Strict.InsOrd as InsOrdHashMap From 081d0d4f6d238d08430db6b08bbd92a733c464e0 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Thu, 21 Sep 2017 21:44:04 +0300 Subject: [PATCH 2/2] Build against aeson-1.2.2.0 with default stack.yaml --- src/Data/Swagger/Internal/ParamSchema.hs | 2 ++ src/Data/Swagger/Internal/Schema.hs | 1 + stack.yaml | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/Data/Swagger/Internal/ParamSchema.hs b/src/Data/Swagger/Internal/ParamSchema.hs index ae4d2cf..3129156 100644 --- a/src/Data/Swagger/Internal/ParamSchema.hs +++ b/src/Data/Swagger/Internal/ParamSchema.hs @@ -315,3 +315,5 @@ instance Constructor c => GEnumParamSchema (C1 c U1) where data Proxy3 a b c = Proxy3 +-- $setup +-- >>> import Data.Aeson (encode) diff --git a/src/Data/Swagger/Internal/Schema.hs b/src/Data/Swagger/Internal/Schema.hs index 4473fb4..40cacf2 100644 --- a/src/Data/Swagger/Internal/Schema.hs +++ b/src/Data/Swagger/Internal/Schema.hs @@ -796,3 +796,4 @@ data Proxy3 a b c = Proxy3 -- $setup -- >>> import Data.Swagger +-- >>> import Data.Aeson (encode) diff --git a/stack.yaml b/stack.yaml index 1ee0cfe..801e7cc 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,3 +1,5 @@ resolver: lts-9.3 packages: - '.' +extra-deps: +- aeson-1.2.2.0