aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-03-07 14:16:21 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2017-03-07 14:16:21 +0100
commit7065a8cc1b8b01cd32d4b1d5317b323fec5238bd (patch)
treed6608f463b066aa6caf33357fd9ae0e508e49084 /spec
parent75d9fe614dca572aa1d7cfa53553e9c103eb2dd0 (diff)
downloadthermoprint-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.hs8
-rw-r--r--spec/src/Thermoprint/Identifiers.hs8
-rw-r--r--spec/thermoprint-spec.cabal6
-rw-r--r--spec/thermoprint-spec.nix2
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(..))
55import Test.QuickCheck.Gen (scale, variant, oneof) 55import Test.QuickCheck.Gen (scale, variant, oneof)
56import Test.QuickCheck.Instances 56import Test.QuickCheck.Instances
57 57
58instance (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
61instance (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
64data PrinterStatus = Busy JobId 64data 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)
13import Control.DeepSeq (NFData) 13import Control.DeepSeq (NFData)
14 14
15import Servant.API (ToHttpApiData, FromHttpApiData) 15import Servant.API (ToHttpApiData, FromHttpApiData)
16import Data.Aeson (FromJSON, ToJSON) 16import Data.Aeson (FromJSON, ToJSON, FromJSONKey, ToJSONKey)
17 17
18newtype PrinterId = PrinterId Integer 18newtype 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
21newtype JobId = JobId Integer 21newtype 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
24newtype DraftId = DraftId Integer 24newtype 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
27castId :: (Integral a, Enum b) => a -> b 27castId :: (Integral a, Enum b) => a -> b
28castId = toEnum . fromInteger . toInteger 28castId = 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
4name: thermoprint-spec 4name: thermoprint-spec
5version: 5.0.1 5version: 6.0.0
6synopsis: A specification of the API and the payload datatypes and associated utilities 6synopsis: A specification of the API and the payload datatypes and associated utilities
7-- description: 7-- description:
8homepage: http://dirty-haskell.org/tags/thermoprint.html 8homepage: 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}:
5mkDerivation { 5mkDerivation {
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