fold-debounce 0.2.0.0 → 0.2.0.1
raw patch · 4 files changed
+19/−12 lines, 4 filesdep +data-default-classdep −data-defaultdep ~hspecdep ~timePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: data-default-class
Dependencies removed: data-default
Dependency ranges changed: hspec, time
API changes (from Hackage documentation)
- Control.FoldDebounce: cb :: Args i o -> o -> IO ()
- Control.FoldDebounce: fold :: Args i o -> o -> i -> o
- Control.FoldDebounce: init :: Args i o -> o
- Control.FoldDebounce: instance Default (Opts i o)
- Control.FoldDebounce: instance Exception OpException
- Control.FoldDebounce: instance Show OpException
- Control.FoldDebounce: instance Typeable OpException
+ Control.FoldDebounce: [cb] :: Args i o -> o -> IO ()
+ Control.FoldDebounce: [fold] :: Args i o -> o -> i -> o
+ Control.FoldDebounce: [init] :: Args i o -> o
+ Control.FoldDebounce: instance Data.Default.Class.Default (Control.FoldDebounce.Opts i o)
+ Control.FoldDebounce: instance GHC.Exception.Exception Control.FoldDebounce.OpException
+ Control.FoldDebounce: instance GHC.Show.Show Control.FoldDebounce.OpException
Files
- ChangeLog.md +7/−0
- fold-debounce.cabal +8/−8
- src/Control/FoldDebounce.hs +1/−1
- test/Control/FoldDebounceSpec.hs +3/−3
ChangeLog.md view
@@ -1,5 +1,12 @@ # Revision history for fold-debounce +## 0.2.0.1 -- 2016-05-02++* Loosen dependency on `data-default` to `data-default-class`.+* Supports `time-1.6` and `hspec-2.2.3`.+* Fix test error in Mac OS X.++ ## 0.2.0.0 -- 2015-06-01 * The debounce period now starts from the time when the first input
fold-debounce.cabal view
@@ -1,5 +1,5 @@ name: fold-debounce-version: 0.2.0.0+version: 0.2.0.1 author: Toshio Ito <debug.ito@gmail.com> maintainer: Toshio Ito <debug.ito@gmail.com> license: BSD3@@ -16,25 +16,25 @@ library default-language: Haskell2010 hs-source-dirs: src- ghc-options: -Wall+ ghc-options: -Wall -fno-warn-unused-imports exposed-modules: Control.FoldDebounce default-extensions: DeriveDataTypeable -- other-modules: build-depends: base >= 4.6.0 && < 4.9,- data-default >=0.5.3 && <0.6,+ data-default-class >=0.0.1, stm >=2.4.2 && <2.5,- time >=1.4.0 && <1.6,+ time >=1.4.0 && <1.7, stm-delay >=0.1.1 && <0.2 test-suite spec type: exitcode-stdio-1.0 default-language: Haskell2010 hs-source-dirs: test- ghc-options: -Wall+ ghc-options: -Wall -fno-warn-unused-imports "-with-rtsopts=-M512m" main-is: Spec.hs other-modules: Control.FoldDebounceSpec build-depends: base, fold-debounce,- hspec >=2.1.7 && <2.2,+ hspec >=2.1.7 && <2.3, stm, time @@ -42,11 +42,11 @@ type: exitcode-stdio-1.0 default-language: Haskell2010 hs-source-dirs: test- ghc-options: -Wall -threaded+ ghc-options: -Wall -threaded -fno-warn-unused-imports "-with-rtsopts=-M512m" main-is: Spec.hs other-modules: Control.FoldDebounceSpec build-depends: base, fold-debounce,- hspec >=2.1.7 && <2.2,+ hspec >=2.1.7 && <2.3, stm, time
src/Control/FoldDebounce.hs view
@@ -81,7 +81,7 @@ import Control.Exception (Exception, SomeException, bracket) import Data.Typeable (Typeable) -import Data.Default (Default(def))+import Data.Default.Class (Default(def)) import Control.Concurrent.STM (TChan, readTChan, newTChanIO, writeTChan, TVar, readTVar, writeTVar, newTVarIO, STM, retry, atomically, throwSTM)
test/Control/FoldDebounceSpec.hs view
@@ -6,7 +6,7 @@ import Data.Time (getCurrentTime, addUTCTime) import Control.Monad.STM (atomically, STM)-import Control.Concurrent.STM.TChan (TChan,newTChan,writeTChan,readTChan,tryPeekTChan,tryReadTChan)+import Control.Concurrent.STM.TChan (TChan,newTChan,writeTChan,readTChan,tryReadTChan) import Test.Hspec import qualified Control.FoldDebounce as F @@ -58,8 +58,8 @@ it "waits for more events that follow the first event" $ do (trig, output) <- fifoTrigger F.def { F.delay = 500000 } F.send trig 10- threadDelay 30000- atomically (tryPeekTChan output) `shouldReturn` Nothing+ threadDelay 200000+ atomically (tryReadTChan output) `shouldReturn` Nothing threadDelay 500000 atomically (tryReadTChan output) `shouldReturn` Just [10] F.close trig