moffy-samples-events 0.2.2.1 → 0.2.2.2
raw patch · 3 files changed
+17/−3 lines, 3 filesdep +deepseqPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependencies added: deepseq
API changes (from Hackage documentation)
+ Control.Moffy.Samples.Followbox.Event: instance Control.DeepSeq.NFData Control.Moffy.Samples.Followbox.Event.Error
+ Control.Moffy.Samples.Followbox.Event: instance GHC.Generics.Generic Control.Moffy.Samples.Followbox.Event.Error
+ Control.Moffy.Samples.Viewable.Image: instance Control.DeepSeq.NFData Control.Moffy.Samples.Viewable.Image.Png
+ Control.Moffy.Samples.Viewable.Image: instance GHC.Generics.Generic Control.Moffy.Samples.Viewable.Image.Png
Files
- moffy-samples-events.cabal +3/−1
- src/Control/Moffy/Samples/Followbox/Event.hs +7/−1
- src/Control/Moffy/Samples/Viewable/Image.hs +7/−1
moffy-samples-events.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: moffy-samples-events-version: 0.2.2.1+version: 0.2.2.2 synopsis: Events for sample codes of moffy description: Please see the README on GitHub at <https://github.com/YoshikuniJujo/moffy-samples-events#readme> category: Control@@ -61,6 +61,7 @@ , base >=4.7 && <5 , bytestring , containers+ , deepseq , http-conduit , moffy , monads-tf@@ -90,6 +91,7 @@ , base >=4.7 && <5 , bytestring , containers+ , deepseq , http-conduit , moffy , moffy-samples-events
src/Control/Moffy/Samples/Followbox/Event.hs view
@@ -4,6 +4,7 @@ {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE DataKinds, TypeOperators #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE DeriveGeneric #-} {-# OPTIONS_GHC -Wall -fno-warn-tabs -fno-warn-orphans #-} module Control.Moffy.Samples.Followbox.Event (@@ -28,6 +29,9 @@ RaiseError(..), pattern OccRaiseError, Error(..), ErrorResult(..), raiseError, checkTerminate ) where +import GHC.Generics (Generic)+import Control.DeepSeq+ import Control.Moffy (Sig, React, Request(..), await) import Control.Moffy.Event.ThreadId (GetThreadId) import Control.Moffy.Event.Lock (LockEv)@@ -151,7 +155,9 @@ data Error = NoRateLimitRemaining | NoRateLimitReset | NotJson | EmptyJson | NoLoginName | NoAvatarAddress | NoAvatar- | NoHtmlUrl | Trace | CatchError deriving (Show, Eq, Ord)+ | NoHtmlUrl | Trace | CatchError deriving (Show, Eq, Ord, Generic)++instance NFData Error data ErrorResult = Continue | Terminate deriving Show
src/Control/Moffy/Samples/Viewable/Image.hs view
@@ -3,10 +3,14 @@ {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE DataKinds, TypeOperators #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE DeriveGeneric #-} {-# OPTIONS_GHC -Wall -fno-warn-tabs #-} module Control.Moffy.Samples.Viewable.Image (Image(..), Png(..)) where +import GHC.Generics+import Control.DeepSeq+ import Data.Type.Set import qualified Data.ByteString as BS @@ -14,5 +18,7 @@ data Image = Image' Position Png deriving Show data Png = Png { pngWidth :: Double, pngHeight :: Double, pngData :: BS.ByteString }- deriving Show+ deriving (Show, Generic) numbered [t| Image |]++instance NFData Png