From 1c0ff2e51ba225617b17d7c26b64c89021cf8e83 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 23 Jan 2016 13:57:41 +0000 Subject: NFData instances --- spec/src/Thermoprint/API.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'spec/src/Thermoprint/API.hs') diff --git a/spec/src/Thermoprint/API.hs b/spec/src/Thermoprint/API.hs index 00115f3..e3d4b61 100644 --- a/spec/src/Thermoprint/API.hs +++ b/spec/src/Thermoprint/API.hs @@ -30,12 +30,13 @@ import qualified Data.IntMap.Strict as IntMap (foldMapWithKey, singleton) import Data.Text (Text) +import Data.Typeable (Typeable) import GHC.Generics (Generic) +import Control.DeepSeq (NFData) import Data.Proxy (Proxy(..)) import Control.Exception (Exception) -import Data.Typeable (Typeable) instance (Integral k, Ord k, ToJSON v) => ToJSON (Map k v) where toJSON = toJSON . Map.foldMapWithKey (IntMap.singleton . castId) @@ -55,7 +56,7 @@ data JobStatus = Queued PrinterId deriving (Generic, Show, Read, FromJSON, ToJSON) data PrintingError = UnknownError - deriving (Typeable, Generic, Show, Read, FromJSON, ToJSON, Exception) + deriving (Typeable, Generic, NFData, Show, Read, FromJSON, ToJSON, Exception) type DraftTitle = Text -- cgit v1.2.3