diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-07 14:16:21 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-07 14:16:21 +0100 |
commit | 7065a8cc1b8b01cd32d4b1d5317b323fec5238bd (patch) | |
tree | d6608f463b066aa6caf33357fd9ae0e508e49084 /spec | |
parent | 75d9fe614dca572aa1d7cfa53553e9c103eb2dd0 (diff) | |
download | thermoprint-7065a8cc1b8b01cd32d4b1d5317b323fec5238bd.tar thermoprint-7065a8cc1b8b01cd32d4b1d5317b323fec5238bd.tar.gz thermoprint-7065a8cc1b8b01cd32d4b1d5317b323fec5238bd.tar.bz2 thermoprint-7065a8cc1b8b01cd32d4b1d5317b323fec5238bd.tar.xz thermoprint-7065a8cc1b8b01cd32d4b1d5317b323fec5238bd.zip |
Bump versions
Diffstat (limited to 'spec')
-rw-r--r-- | spec/src/Thermoprint/API.hs | 8 | ||||
-rw-r--r-- | spec/src/Thermoprint/Identifiers.hs | 8 | ||||
-rw-r--r-- | spec/thermoprint-spec.cabal | 6 | ||||
-rw-r--r-- | spec/thermoprint-spec.nix | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/spec/src/Thermoprint/API.hs b/spec/src/Thermoprint/API.hs index 8e98db8..5b24e54 100644 --- a/spec/src/Thermoprint/API.hs +++ b/spec/src/Thermoprint/API.hs | |||
@@ -55,11 +55,11 @@ import Test.QuickCheck.Arbitrary (Arbitrary(..), CoArbitrary(..)) | |||
55 | import Test.QuickCheck.Gen (scale, variant, oneof) | 55 | import Test.QuickCheck.Gen (scale, variant, oneof) |
56 | import Test.QuickCheck.Instances | 56 | import Test.QuickCheck.Instances |
57 | 57 | ||
58 | instance (Integral k, Ord k, ToJSON v) => ToJSON (Map k v) where | 58 | -- instance (Integral k, Ord k, ToJSON v) => ToJSON (Map k v) where |
59 | toJSON = toJSON . Map.foldMapWithKey (IntMap.singleton . castId) | 59 | -- toJSON = toJSON . Map.foldMapWithKey (IntMap.singleton . castId) |
60 | 60 | ||
61 | instance (Enum k, Ord k, FromJSON v) => FromJSON (Map k v) where | 61 | -- instance (Enum k, Ord k, FromJSON v) => FromJSON (Map k v) where |
62 | parseJSON = fmap (IntMap.foldMapWithKey $ Map.singleton . castId) . parseJSON | 62 | -- parseJSON = fmap (IntMap.foldMapWithKey $ Map.singleton . castId) . parseJSON |
63 | 63 | ||
64 | data PrinterStatus = Busy JobId | 64 | data PrinterStatus = Busy JobId |
65 | | Available | 65 | | Available |
diff --git a/spec/src/Thermoprint/Identifiers.hs b/spec/src/Thermoprint/Identifiers.hs index 2a07318..e90602c 100644 --- a/spec/src/Thermoprint/Identifiers.hs +++ b/spec/src/Thermoprint/Identifiers.hs | |||
@@ -13,16 +13,16 @@ import GHC.Generics (Generic) | |||
13 | import Control.DeepSeq (NFData) | 13 | import Control.DeepSeq (NFData) |
14 | 14 | ||
15 | import Servant.API (ToHttpApiData, FromHttpApiData) | 15 | import Servant.API (ToHttpApiData, FromHttpApiData) |
16 | import Data.Aeson (FromJSON, ToJSON) | 16 | import Data.Aeson (FromJSON, ToJSON, FromJSONKey, ToJSONKey) |
17 | 17 | ||
18 | newtype PrinterId = PrinterId Integer | 18 | newtype PrinterId = PrinterId Integer |
19 | deriving (Show, Read, Eq, Ord, Num, Real, Integral, Enum, FromHttpApiData, ToHttpApiData, FromJSON, ToJSON, Typeable, Generic, NFData) | 19 | deriving (Show, Read, Eq, Ord, Num, Real, Integral, Enum, FromHttpApiData, ToHttpApiData, FromJSON, ToJSON, ToJSONKey, FromJSONKey, Typeable, Generic, NFData) |
20 | 20 | ||
21 | newtype JobId = JobId Integer | 21 | newtype JobId = JobId Integer |
22 | deriving (Show, Read, Eq, Ord, Num, Real, Integral, Enum, FromHttpApiData, ToHttpApiData, FromJSON, ToJSON, Typeable, Generic, NFData) | 22 | deriving (Show, Read, Eq, Ord, Num, Real, Integral, Enum, FromHttpApiData, ToHttpApiData, FromJSON, ToJSON, ToJSONKey, FromJSONKey, Typeable, Generic, NFData) |
23 | 23 | ||
24 | newtype DraftId = DraftId Integer | 24 | newtype DraftId = DraftId Integer |
25 | deriving (Show, Read, Eq, Ord, Num, Real, Integral, Enum, FromHttpApiData, ToHttpApiData, FromJSON, ToJSON, Typeable, Generic, NFData) | 25 | deriving (Show, Read, Eq, Ord, Num, Real, Integral, Enum, FromHttpApiData, ToHttpApiData, FromJSON, ToJSON, ToJSONKey, FromJSONKey, Typeable, Generic, NFData) |
26 | 26 | ||
27 | castId :: (Integral a, Enum b) => a -> b | 27 | castId :: (Integral a, Enum b) => a -> b |
28 | castId = toEnum . fromInteger . toInteger | 28 | castId = toEnum . fromInteger . toInteger |
diff --git a/spec/thermoprint-spec.cabal b/spec/thermoprint-spec.cabal index 138a06e..4bcfe6a 100644 --- a/spec/thermoprint-spec.cabal +++ b/spec/thermoprint-spec.cabal | |||
@@ -2,7 +2,7 @@ | |||
2 | -- documentation, see http://haskell.org/cabal/users-guide/ | 2 | -- documentation, see http://haskell.org/cabal/users-guide/ |
3 | 3 | ||
4 | name: thermoprint-spec | 4 | name: thermoprint-spec |
5 | version: 5.0.1 | 5 | version: 6.0.0 |
6 | synopsis: A specification of the API and the payload datatypes and associated utilities | 6 | synopsis: A specification of the API and the payload datatypes and associated utilities |
7 | -- description: | 7 | -- description: |
8 | homepage: http://dirty-haskell.org/tags/thermoprint.html | 8 | homepage: http://dirty-haskell.org/tags/thermoprint.html |
@@ -41,7 +41,7 @@ library | |||
41 | , Cabal >=1.22.4 && <2 | 41 | , Cabal >=1.22.4 && <2 |
42 | , cabal-test-quickcheck >=0.1.6 && <1 | 42 | , cabal-test-quickcheck >=0.1.6 && <1 |
43 | , servant >=0.4.4 && <1 | 43 | , servant >=0.4.4 && <1 |
44 | , aeson >=0.9.0 && <1 | 44 | , aeson >=1.0 && <2 |
45 | , base64-bytestring >=1.0.0 && <2 | 45 | , base64-bytestring >=1.0.0 && <2 |
46 | , encoding >=0.8 && <1 | 46 | , encoding >=0.8 && <1 |
47 | , time >=1.5.0 && <2 | 47 | , time >=1.5.0 && <2 |
@@ -62,4 +62,4 @@ Test-Suite tests | |||
62 | , hspec >=2.2.1 && <3 | 62 | , hspec >=2.2.1 && <3 |
63 | , QuickCheck >=2.8.1 && <3 | 63 | , QuickCheck >=2.8.1 && <3 |
64 | , quickcheck-instances >=0.3.11 && <4 | 64 | , quickcheck-instances >=0.3.11 && <4 |
65 | , aeson >=0.9.0 && <1 \ No newline at end of file | 65 | , aeson >=1.0 && <2 \ No newline at end of file |
diff --git a/spec/thermoprint-spec.nix b/spec/thermoprint-spec.nix index a3093de..d28b405 100644 --- a/spec/thermoprint-spec.nix +++ b/spec/thermoprint-spec.nix | |||
@@ -4,7 +4,7 @@ | |||
4 | }: | 4 | }: |
5 | mkDerivation { | 5 | mkDerivation { |
6 | pname = "thermoprint-spec"; | 6 | pname = "thermoprint-spec"; |
7 | version = "5.0.1"; | 7 | version = "6.0.0"; |
8 | src = ./.; | 8 | src = ./.; |
9 | libraryHaskellDepends = [ | 9 | libraryHaskellDepends = [ |
10 | aeson base base64-bytestring bytestring Cabal cabal-test-quickcheck | 10 | aeson base base64-bytestring bytestring Cabal cabal-test-quickcheck |