hspec-monad-control (empty) → 0.1.0.0
raw patch · 4 files changed
+78/−0 lines, 4 filesdep +basedep +hspec-coredep +monad-controlsetup-changed
Dependencies added: base, hspec-core, monad-control, transformers, transformers-base
Files
- LICENSE +30/−0
- Setup.hs +2/−0
- Test/Hspec/Control.hs +18/−0
- hspec-monad-control.cabal +28/−0
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c) 2015, Ben James++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above+ copyright notice, this list of conditions and the following+ disclaimer in the documentation and/or other materials provided+ with the distribution.++ * Neither the name of Ben James nor the names of other+ contributors may be used to endorse or promote products derived+ from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ Test/Hspec/Control.hs view
@@ -0,0 +1,18 @@+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeFamilies #-}+module Test.Hspec.Control where++import Control.Monad.Base+import Control.Monad.Trans.Control+import Control.Monad.Trans.Writer+import Data.Functor (($>))+import Test.Hspec.Core.Spec++instance MonadBase IO (SpecM a) where+ liftBase = runIO++instance MonadBaseControl IO (SpecM a) where+ type StM (SpecM a) r = (r, [SpecTree a])+ liftBaseWith f = runIO (f runSpecM')+ where runSpecM' (SpecM specs) = runWriterT specs+ restoreM (r, specs) = fromSpecList specs $> r
+ hspec-monad-control.cabal view
@@ -0,0 +1,28 @@+name: hspec-monad-control+version: 0.1.0.0+synopsis: Orphan instances of MonadBase and MonadBaseControl for SpecM+description: Orphan instances of MonadBase and MonadBaseControl for SpecM+stability: alpha+license: BSD3+license-file: LICENSE+author: Ben James+maintainer: bmjames@gmail.com+copyright: Ben James, 2015+category: Control+build-type: Simple+cabal-version: >=1.10+bug-reports: https://github.com/bmjames/hspec-monad-control/issues++source-repository head+ type: git+ location: https://github.com/bmjames/hspec-monad-control.git++library+ exposed-modules: Test.Hspec.Control+ other-extensions: MultiParamTypeClasses, TypeFamilies+ build-depends: base >=4.7 && <4.9+ , hspec-core >=2.0 && <3+ , monad-control >=1.0 && <2+ , transformers >=0.2 && <0.5+ , transformers-base >=0.4.2 && <0.5+ default-language: Haskell2010