Merge pull request #16 from fused-effects/1.1

1.1
main 1.1.0.0
Rob Rix 2020-07-13 11:28:16 -04:00 committed by GitHub
commit ae2d4e9ce8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 66 additions and 41 deletions

52
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: Haskell CI
on: [pull_request]
jobs:
build:
name: ghc ${{ matrix.ghc }}
runs-on: ubuntu-16.04
strategy:
matrix:
ghc: ["8.2.2", "8.4.4", "8.6.5", "8.8.3", "8.10.1"]
cabal: ["latest"]
steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: actions/setup-haskell@v1.1.2
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- uses: actions/cache@v1
name: Cache ~/.cabal/packages
with:
path: ~/.cabal/packages
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-packages
- uses: actions/cache@v1
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store
- uses: actions/cache@v1
name: Cache dist-newstyle
with:
path: dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-fused-effects-exceptions-dist
- name: Install dependencies
run: |
cabal v2-update
cabal v2-configure --project-file=cabal.project.ci --enable-tests --write-ghc-environment-files=always -j2
cabal v2-build --project-file=cabal.project.ci --only-dependencies all
- name: Build & test
run: |
cabal v2-build --project-file=cabal.project.ci
cabal v2-run --project-file=cabal.project.ci test
cabal v2-haddock --project-file=cabal.project.ci
cabal v2-sdist --project-file=cabal.project.ci
cabal check

View File

@ -1,36 +0,0 @@
name: Haskell CI
on: [pull_request]
jobs:
build:
name: ghc ${{ matrix.ghc }}
runs-on: ubuntu-16.04
strategy:
matrix:
ghc: ["8.2.2", "8.4.4", "8.6.5", "8.8.1"]
cabal: ["3.0"]
steps:
- uses: actions/checkout@master
if: github.event.action == 'opened' || github.event.action == 'synchronize'
- uses: actions/setup-haskell@v1
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Install dependencies
run: |
cabal v2-update
cabal v2-configure --enable-tests --write-ghc-environment-files=always -j2
cabal v2-build --only-dependencies
- name: Build & test
run: |
cabal v2-build
cabal v2-test
cabal v2-haddock
cabal v2-sdist
cabal check

View File

@ -1,3 +1,8 @@
# 1.1.0.0
* Port to fused-effects 1.1.
# 1.0.0.0 # 1.0.0.0
* Port to fused-effects 1.0. * Port to fused-effects 1.0.

4
cabal.project.ci Normal file
View File

@ -0,0 +1,4 @@
packages: .
package fused-effects-exceptions
ghc-options: -Werror

View File

@ -1,7 +1,7 @@
cabal-version: 2.4 cabal-version: 2.4
name: fused-effects-exceptions name: fused-effects-exceptions
version: 1.0.0.0 version: 1.1.0.0
synopsis: Handle exceptions thrown in IO with fused-effects. synopsis: Handle exceptions thrown in IO with fused-effects.
description: Provides Resource and Catch effects capable of reacting to and catching GHC's dynamic exceptions. description: Provides Resource and Catch effects capable of reacting to and catching GHC's dynamic exceptions.
homepage: https://github.com/fused-effects/fused-effects-exceptions#readme homepage: https://github.com/fused-effects/fused-effects-exceptions#readme
@ -20,7 +20,8 @@ tested-with:
GHC == 8.2.2 GHC == 8.2.2
GHC == 8.4.4 GHC == 8.4.4
GHC == 8.6.5 GHC == 8.6.5
GHC == 8.8.1 GHC == 8.8.3
GHC == 8.10.1
common common common common
default-language: Haskell2010 default-language: Haskell2010

View File

@ -19,12 +19,12 @@ problematic =
testStateDropsWrites :: Tasty.TestTree testStateDropsWrites :: Tasty.TestTree
testStateDropsWrites = HUnit.testCase "State.Strict drops writes" $ do testStateDropsWrites = HUnit.testCase "State.Strict drops writes" $ do
result <- State.execState 'a' $ problematic result <- State.execState 'a' problematic
result HUnit.@?= 'a' -- writes are lost result HUnit.@?= 'a' -- writes are lost
testIOStatePreservesWrites :: Tasty.TestTree testIOStatePreservesWrites :: Tasty.TestTree
testIOStatePreservesWrites = HUnit.testCase "State.IORef preserves writes" $ do testIOStatePreservesWrites = HUnit.testCase "State.IORef preserves writes" $ do
result <- IOState.execState 'a' $ problematic result <- IOState.execState 'a' problematic
result HUnit.@?= 'x' result HUnit.@?= 'x'
tests :: Tasty.TestTree tests :: Tasty.TestTree
@ -37,4 +37,3 @@ tests = Tasty.testGroup "Control.Carrier.Exception"
main :: IO () main :: IO ()
main = Tasty.defaultMain tests main = Tasty.defaultMain tests