aboutsummaryrefslogtreecommitdiff
path: root/spec/src/Thermoprint/API.hs
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-01-23 13:57:41 +0000
committerGregor Kleen <gkleen@yggdrasil.li>2016-01-23 13:57:41 +0000
commit1c0ff2e51ba225617b17d7c26b64c89021cf8e83 (patch)
treebd3a330a9cd219487deabbc5fedd2619df5265b6 /spec/src/Thermoprint/API.hs
parent32fd365fb546e7e2ad195b575be4bca457cba6e9 (diff)
downloadthermoprint-1c0ff2e51ba225617b17d7c26b64c89021cf8e83.tar
thermoprint-1c0ff2e51ba225617b17d7c26b64c89021cf8e83.tar.gz
thermoprint-1c0ff2e51ba225617b17d7c26b64c89021cf8e83.tar.bz2
thermoprint-1c0ff2e51ba225617b17d7c26b64c89021cf8e83.tar.xz
thermoprint-1c0ff2e51ba225617b17d7c26b64c89021cf8e83.zip
NFData instances
Diffstat (limited to 'spec/src/Thermoprint/API.hs')
-rw-r--r--spec/src/Thermoprint/API.hs5
1 files changed, 3 insertions, 2 deletions
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)
30 30
31import Data.Text (Text) 31import Data.Text (Text)
32 32
33import Data.Typeable (Typeable)
33import GHC.Generics (Generic) 34import GHC.Generics (Generic)
35import Control.DeepSeq (NFData)
34 36
35import Data.Proxy (Proxy(..)) 37import Data.Proxy (Proxy(..))
36 38
37import Control.Exception (Exception) 39import Control.Exception (Exception)
38import Data.Typeable (Typeable)
39 40
40instance (Integral k, Ord k, ToJSON v) => ToJSON (Map k v) where 41instance (Integral k, Ord k, ToJSON v) => ToJSON (Map k v) where
41 toJSON = toJSON . Map.foldMapWithKey (IntMap.singleton . castId) 42 toJSON = toJSON . Map.foldMapWithKey (IntMap.singleton . castId)
@@ -55,7 +56,7 @@ data JobStatus = Queued PrinterId
55 deriving (Generic, Show, Read, FromJSON, ToJSON) 56 deriving (Generic, Show, Read, FromJSON, ToJSON)
56 57
57data PrintingError = UnknownError 58data PrintingError = UnknownError
58 deriving (Typeable, Generic, Show, Read, FromJSON, ToJSON, Exception) 59 deriving (Typeable, Generic, NFData, Show, Read, FromJSON, ToJSON, Exception)
59 60
60type DraftTitle = Text 61type DraftTitle = Text
61 62