mirror of
https://github.com/kowainik/relude.git
synced 2024-09-11 04:35:39 +03:00
Use latest Stackage snapshot (#226)
* Use latest Stackage snapshot * Fix doctest for GHC-8.8 * Fix doctest in a consistent way
This commit is contained in:
parent
a0e1e3ee56
commit
bfb5f60dd4
@ -23,7 +23,7 @@ matrix:
|
||||
- ghc: 8.8.1
|
||||
|
||||
# stack
|
||||
- ghc: 8.6.5
|
||||
- ghc: 8.8.1
|
||||
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml"
|
||||
|
||||
install:
|
||||
|
@ -32,12 +32,12 @@ import qualified Control.Exception.Base (evaluate)
|
||||
|
||||
{- | Lifted alias for 'Control.Exception.Base.evaluate' with clearer name.
|
||||
|
||||
>>> list = [2, 1, 3] :: [Int]
|
||||
>>> let list = [1..5] :: [Int]
|
||||
>>> :sprint list
|
||||
list = _
|
||||
>>> () <$ evaluateWHNF list
|
||||
>>> :sprint list
|
||||
list = _ : _
|
||||
list = 1 : _
|
||||
-}
|
||||
evaluateWHNF :: MonadIO m => a -> m a
|
||||
evaluateWHNF = liftIO . Control.Exception.Base.evaluate
|
||||
@ -46,13 +46,12 @@ evaluateWHNF = liftIO . Control.Exception.Base.evaluate
|
||||
|
||||
{- | Like 'evaluateWHNF' but discards value.
|
||||
|
||||
>>> list = [2, 1, 3] :: [Int]
|
||||
>>> let list = [1..5] :: [Int]
|
||||
>>> :sprint list
|
||||
list = _
|
||||
>>> evaluateWHNF_ list
|
||||
>>> :sprint list
|
||||
list = _ : _
|
||||
|
||||
list = 1 : _
|
||||
-}
|
||||
evaluateWHNF_ :: MonadIO m => a -> m ()
|
||||
evaluateWHNF_ what = (`seq` ()) <$!> evaluateWHNF what
|
||||
@ -61,13 +60,12 @@ evaluateWHNF_ what = (`seq` ()) <$!> evaluateWHNF what
|
||||
|
||||
{- | Alias for @evaluateWHNF . force@ with clearer name.
|
||||
|
||||
>>> list = [2, 1, 3] :: [Int]
|
||||
>>> let list = [1..5] :: [Int]
|
||||
>>> :sprint list
|
||||
list = _
|
||||
>>> () <$ evaluateNF list
|
||||
>>> :sprint list
|
||||
list = [2,1,3]
|
||||
|
||||
list = [1,2,3,4,5]
|
||||
-}
|
||||
evaluateNF :: (NFData a, MonadIO m) => a -> m a
|
||||
evaluateNF = evaluateWHNF . force
|
||||
@ -77,13 +75,12 @@ evaluateNF = evaluateWHNF . force
|
||||
{- | Alias for @evaluateWHNF . rnf@. Similar to 'evaluateNF'
|
||||
-- but discards resulting value.
|
||||
|
||||
>>> list = [2, 1, 3] :: [Int]
|
||||
>>> let list = [1..5] :: [Int]
|
||||
>>> :sprint list
|
||||
list = _
|
||||
>>> evaluateNF_ list
|
||||
>>> :sprint list
|
||||
list = [2,1,3]
|
||||
|
||||
list = [1,2,3,4,5]
|
||||
-}
|
||||
evaluateNF_ :: (NFData a, MonadIO m) => a -> m ()
|
||||
evaluateNF_ = evaluateWHNF . rnf
|
||||
|
@ -1,4 +1,4 @@
|
||||
resolver: lts-14.6
|
||||
resolver: nightly-2019-10-31
|
||||
|
||||
nix:
|
||||
packages: [binutils, gmp]
|
||||
|
Loading…
Reference in New Issue
Block a user