stack test harness

This commit is contained in:
Stephen Diehl
2017-01-02 10:45:43 +00:00
parent 51fdf38c71
commit e836d3f690
10 changed files with 90 additions and 24 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
*.sw[po] *.sw[pon]
.stack-work .stack-work
dist dist
.cabal-sandbox .cabal-sandbox
+4 -1
View File
@@ -7,7 +7,10 @@
* Export `genericLength` and other generic list return functions. * Export `genericLength` and other generic list return functions.
* Rename `msg` to `fatalErrorMessage`. * Rename `msg` to `fatalErrorMessage`.
* Export `ExceptT`, `ReaderT`, and `StateT` constructors. * Export `ExceptT`, `ReaderT`, and `StateT` constructors.
* Export `NonEmpty` type and constructor for GHC 8.0. * Mask `displayException` from default exports.
* Mask `stToIO` from default exports.
* Export `NonEmpty` type and constructor for Base 4.9 only.
* Export `Data.Semigroup` type and functions for Base 4.9 only.
0.1.9 0.1.9
==== ====
+4 -3
View File
@@ -69,11 +69,12 @@ library
deepseq >= 1.3 && <1.5, deepseq >= 1.3 && <1.5,
containers >= 0.5 && <0.6, containers >= 0.5 && <0.6,
hashable >= 1.2 && <1.3, hashable >= 1.2 && <1.3,
mtl >= 2.1 && <2.3, transformers >= 0.2 && <0.6,
transformers >= 0.4 && <0.6,
text >= 1.2 && <1.3, text >= 1.2 && <1.3,
stm >= 2.4 && <2.5, stm >= 2.4 && <2.5,
bytestring >= 0.10 && <0.11 bytestring >= 0.10 && <0.11,
mtl >= 2.1 && <2.3,
mtl-compat >= 0.2 && <0.3
if impl(ghc >= 7.8.0) if impl(ghc >= 7.8.0)
build-depends: build-depends:
+6
View File
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE NoImplicitPrelude #-}
@@ -21,8 +22,13 @@ hush :: Alternative m => Either e a -> m a
hush (Left _) = empty hush (Left _) = empty
hush (Right x) = pure x hush (Right x) = pure x
#if ( __GLASGOW_HASKELL__ >= 800 )
note :: (MonadError e m) => e -> Maybe a -> m a
note err = maybe (throwError err) pure
#else
note :: (MonadError e m, Applicative m) => e -> Maybe a -> m a note :: (MonadError e m, Applicative m) => e -> Maybe a -> m a
note err = maybe (throwError err) pure note err = maybe (throwError err) pure
#endif
tryIO :: MonadIO m => IO a -> ExceptT IOException m a tryIO :: MonadIO m => IO a -> ExceptT IOException m a
tryIO = ExceptT . liftIO . Exception.try tryIO = ExceptT . liftIO . Exception.try
+53 -18
View File
@@ -28,6 +28,7 @@ module Protolude (
#endif #endif
) where ) where
-- Protolude module exports.
import List as X import List as X
import Show as X import Show as X
import Bool as X import Bool as X
@@ -39,6 +40,7 @@ import Applicative as X
import Conv as X import Conv as X
import Panic as X import Panic as X
import Exceptions as X import Exceptions as X
import Semiring as X
import Base as Base hiding ( import Base as Base hiding (
putStr -- Overriden by Show.putStr putStr -- Overriden by Show.putStr
@@ -100,11 +102,9 @@ import Data.Foldable as X hiding (
, product , product
, sum , sum
) )
import Semiring as X
import Data.Functor.Identity as X import Data.Functor.Identity as X
#if ( __GLASGOW_HASKELL__ >= 800 ) #if MIN_VERSION_base(4,9,0)
import Data.Monoid as X
import Data.List.NonEmpty as X ( import Data.List.NonEmpty as X (
NonEmpty(..) NonEmpty(..)
, nonEmpty , nonEmpty
@@ -121,14 +121,14 @@ import Data.Semigroup as X (
, stimesIdempotentMonoid , stimesIdempotentMonoid
, mtimesDefault , mtimesDefault
) )
#else
import Data.Monoid as X
#endif #endif
#if (__GLASGOW_HASKELL__ >= 710) import Data.Monoid as X
import Data.Bifunctor as X (Bifunctor(..))
#else #if !MIN_VERSION_base(4,8,0)
import Bifunctor as X (Bifunctor(..)) import Bifunctor as X (Bifunctor(..))
#else
import Data.Bifunctor as X (Bifunctor(..))
#endif #endif
-- Deepseq -- Deepseq
@@ -140,7 +140,14 @@ import Control.DeepSeq as X (
) )
-- Data structures -- Data structures
import Data.Tuple as X import Data.Tuple as X (
fst
, snd
, curry
, uncurry
, swap
)
import Data.List as X ( import Data.List as X (
splitAt splitAt
, break , break
@@ -191,7 +198,7 @@ import Data.Sequence as X (Seq)
import Data.IntMap as X (IntMap) import Data.IntMap as X (IntMap)
import Data.IntSet as X (IntSet) import Data.IntSet as X (IntSet)
#if ( __GLASGOW_HASKELL__ >= 710 ) #if !MIN_VERSION_base(4,7,0)
import Data.Proxy as X ( import Data.Proxy as X (
Proxy(..) Proxy(..)
) )
@@ -287,15 +294,32 @@ import Data.Word as X (
, Word32 , Word32
, Word64 , Word64
, Word8 , Word8
#if (__GLASGOW_HASKELL__ >= 710)
, byteSwap16 , byteSwap16
, byteSwap32 , byteSwap32
, byteSwap64 , byteSwap64
#endif
) )
import Data.Either as X import Data.Either as X (
import Data.Complex as X Either(..)
, either
, lefts
, rights
, isLeft
, isRight
, partitionEithers
)
import Data.Complex as X (
Complex(..)
, realPart
, imagPart
, mkPolar
, cis
, polar
, magnitude
, phase
, conjugate
)
import Data.Char as X (chr) import Data.Char as X (chr)
import Data.Bool as X hiding (bool) import Data.Bool as X hiding (bool)
import Data.Maybe as X hiding (fromJust) import Data.Maybe as X hiding (fromJust)
@@ -307,7 +331,7 @@ import Data.Function as X (
, flip , flip
, fix , fix
, on , on
#if ( __GLASGOW_HASKELL__ >= 800 ) #if MIN_VERSION_base(4,8,0)
, (&) , (&)
#endif #endif
) )
@@ -375,8 +399,16 @@ import Data.Text.Encoding.Error as X (
) )
-- IO -- IO
import System.Exit as X
import System.Environment as X (getArgs) import System.Environment as X (getArgs)
import System.Exit as X (
ExitCode(..)
, exitWith
, exitFailure
, exitSuccess
#if MIN_VERSION_base(4,8,0)
, die
#endif
)
import System.IO as X ( import System.IO as X (
Handle Handle
, FilePath , FilePath
@@ -389,7 +421,11 @@ import System.IO as X (
) )
-- ST -- ST
import Control.Monad.ST as X import Control.Monad.ST as X (
ST
, runST
, fixST
)
-- Concurrency and Parallelism -- Concurrency and Parallelism
import Control.Exception as X hiding ( import Control.Exception as X hiding (
@@ -397,7 +433,6 @@ import Control.Exception as X hiding (
, throwIO , throwIO
, throwTo , throwTo
, assert , assert
, displayException
, Handler(..) , Handler(..)
) )
+6
View File
@@ -0,0 +1,6 @@
resolver: lts-6.24
packages:
- '.'
extra-deps:
flags: {}
extra-package-dbs: []
+6
View File
@@ -0,0 +1,6 @@
resolver: lts-2.22
packages:
- '.'
extra-deps:
flags: {}
extra-package-dbs: []
+6
View File
@@ -0,0 +1,6 @@
resolver: lts-7.8
packages:
- '.'
extra-deps:
flags: {}
extra-package-dbs: []
+1 -1
View File
@@ -1,4 +1,4 @@
resolver: lts-6.2 resolver: lts-7.14
packages: packages:
- '.' - '.'
extra-deps: extra-deps:
+3
View File
@@ -0,0 +1,3 @@
STACK_YAML=stack-7.8.yaml stack build
STACK_YAML=stack-7.10.yaml stack build
STACK_YAML=stack-8.0.yaml stack build