From 7065a8cc1b8b01cd32d4b1d5317b323fec5238bd Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 7 Mar 2017 14:16:21 +0100 Subject: Bump versions --- spec/src/Thermoprint/API.hs | 8 ++++---- spec/src/Thermoprint/Identifiers.hs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'spec/src') 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(..)) import Test.QuickCheck.Gen (scale, variant, oneof) import Test.QuickCheck.Instances -instance (Integral k, Ord k, ToJSON v) => ToJSON (Map k v) where - toJSON = toJSON . Map.foldMapWithKey (IntMap.singleton . castId) +-- instance (Integral k, Ord k, ToJSON v) => ToJSON (Map k v) where +-- toJSON = toJSON . Map.foldMapWithKey (IntMap.singleton . castId) -instance (Enum k, Ord k, FromJSON v) => FromJSON (Map k v) where - parseJSON = fmap (IntMap.foldMapWithKey $ Map.singleton . castId) . parseJSON +-- instance (Enum k, Ord k, FromJSON v) => FromJSON (Map k v) where +-- parseJSON = fmap (IntMap.foldMapWithKey $ Map.singleton . castId) . parseJSON data PrinterStatus = Busy JobId | 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) import Control.DeepSeq (NFData) import Servant.API (ToHttpApiData, FromHttpApiData) -import Data.Aeson (FromJSON, ToJSON) +import Data.Aeson (FromJSON, ToJSON, FromJSONKey, ToJSONKey) newtype PrinterId = PrinterId Integer - deriving (Show, Read, Eq, Ord, Num, Real, Integral, Enum, FromHttpApiData, ToHttpApiData, FromJSON, ToJSON, Typeable, Generic, NFData) + deriving (Show, Read, Eq, Ord, Num, Real, Integral, Enum, FromHttpApiData, ToHttpApiData, FromJSON, ToJSON, ToJSONKey, FromJSONKey, Typeable, Generic, NFData) newtype JobId = JobId Integer - deriving (Show, Read, Eq, Ord, Num, Real, Integral, Enum, FromHttpApiData, ToHttpApiData, FromJSON, ToJSON, Typeable, Generic, NFData) + deriving (Show, Read, Eq, Ord, Num, Real, Integral, Enum, FromHttpApiData, ToHttpApiData, FromJSON, ToJSON, ToJSONKey, FromJSONKey, Typeable, Generic, NFData) newtype DraftId = DraftId Integer - deriving (Show, Read, Eq, Ord, Num, Real, Integral, Enum, FromHttpApiData, ToHttpApiData, FromJSON, ToJSON, Typeable, Generic, NFData) + deriving (Show, Read, Eq, Ord, Num, Real, Integral, Enum, FromHttpApiData, ToHttpApiData, FromJSON, ToJSON, ToJSONKey, FromJSONKey, Typeable, Generic, NFData) castId :: (Integral a, Enum b) => a -> b castId = toEnum . fromInteger . toInteger -- cgit v1.2.3