on master help sign in
Split effectful package (#27)

* Moved effectful library to a subdirectory * Initial commit of the effectful-core library * Removed tests/benchmarks/examples from effectful-core package * Removed READMEs from packages * Updated CI * Refactored doctest script This is a bit closer to the CI setup. * Adjusted dependencies * Updated README * Updated the package descriptions * Added examples to test suite

commitf0bf1e49db95e8b9cb0a842ac67da162460bf260 authorMann mit Hut <mmhat@users.noreply.github.com> dateSun 25 Jul 2021, 15:18 (5 years ago) parentd4eb837
45 files changed+258−69
.github/workflows/haskell-ci.yml+14−6 README.md+15−1 cabal.project+3 doctest.sh+32−22 effectful-core/CHANGELOG.md+2 effectful-core/LICENSE+30 effectful-core/effectful-core.cabal+100 src/Effectful/Error.hs → effectful-core/src/Effectful/Error.hs src/Effectful/Error/Dynamic.hs → effectful-core/src/Effectful/Error/Dynamic.hs src/Effectful/Fail.hs → effectful-core/src/Effectful/Fail.hs src/Effectful/Handler.hs → effectful-core/src/Effectful/Handler.hs−1 src/Effectful/Internal/Effect.hs → effectful-core/src/Effectful/Internal/Effect.hs src/Effectful/Internal/Env.hs → effectful-core/src/Effectful/Internal/Env.hs src/Effectful/Internal/Monad.hs → effectful-core/src/Effectful/Internal/Monad.hs src/Effectful/Internal/Unlift.hs → effectful-core/src/Effectful/Internal/Unlift.hs src/Effectful/Monad.hs → effectful-core/src/Effectful/Monad.hs src/Effectful/Reader.hs → effectful-core/src/Effectful/Reader.hs src/Effectful/Reader/Dynamic.hs → effectful-core/src/Effectful/Reader/Dynamic.hs src/Effectful/State/Dynamic.hs → effectful-core/src/Effectful/State/Dynamic.hs src/Effectful/State/Local.hs → effectful-core/src/Effectful/State/Local.hs src/Effectful/State/Shared.hs → effectful-core/src/Effectful/State/Shared.hs src/Effectful/Writer/Dynamic.hs → effectful-core/src/Effectful/Writer/Dynamic.hs src/Effectful/Writer/Local.hs → effectful-core/src/Effectful/Writer/Local.hs src/Effectful/Writer/Shared.hs → effectful-core/src/Effectful/Writer/Shared.hs utils/Effectful/Internal/Utils.hs → effectful-core/utils/Effectful/Internal/Utils.hs utils/utils.c → effectful-core/utils/utils.c effectful/CHANGELOG.md+2 effectful/LICENSE+30 bench/Concurrency.hs → effectful/bench/Concurrency.hs bench/Countdown.hs → effectful/bench/Countdown.hs bench/FileSizes.hs → effectful/bench/FileSizes.hs bench/Main.hs → effectful/bench/Main.hs bench/Unlift.hs → effectful/bench/Unlift.hs bench/Utils.hs → effectful/bench/Utils.hs effectful.cabal → effectful/effectful.cabal+28−37 examples/FileSystem.hs → effectful/examples/FileSystem.hs+2−2 src/Effectful.hs → effectful/src/Effectful.hs src/Effectful/Async.hs → effectful/src/Effectful/Async.hs src/Effectful/Resource.hs → effectful/src/Effectful/Resource.hs tests/AsyncTests.hs → effectful/tests/AsyncTests.hs tests/ConcurrencyTests.hs → effectful/tests/ConcurrencyTests.hs tests/ErrorTests.hs → effectful/tests/ErrorTests.hs tests/Main.hs → effectful/tests/Main.hs tests/StateTests.hs → effectful/tests/StateTests.hs tests/Utils.hs → effectful/tests/Utils.hs
.github/workflows/haskell-ci.yml+14−6
@@ -1,6 +1,6 @@
11# This GitHub workflow config has been generated by a script via
22#
3−# haskell-ci 'github' '--config=cabal.haskell-ci' 'effectful.cabal'
3+# haskell-ci 'github' '--config=cabal.haskell-ci' 'cabal.project'
44#
55# To regenerate the script (for example after adjusting tested-with) run
66#
@@ -10,7 +10,7 @@
1010#
1111# version: 0.13.20210621
1212#
13−# REGENDATA ("0.13.20210621",["github","--config=cabal.haskell-ci","effectful.cabal"])
13+# REGENDATA ("0.13.20210621",["github","--config=cabal.haskell-ci","cabal.project"])
1414#
1515name: Haskell-CI
1616on:
@@ -170,7 +170,8 @@ jobs:
170170 - name: initial cabal.project for sdist
171171 run: |
172172 touch cabal.project
173− echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project
173+ echo "packages: $GITHUB_WORKSPACE/source/effectful" >> cabal.project
174+ echo "packages: $GITHUB_WORKSPACE/source/effectful-core" >> cabal.project
174175 cat cabal.project
175176 - name: sdist
176177 run: |
@@ -184,12 +185,17 @@ jobs:
184185 run: |
185186 PKGDIR_effectful="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/effectful-[0-9.]*')"
186187 echo "PKGDIR_effectful=${PKGDIR_effectful}" >> "$GITHUB_ENV"
188+ PKGDIR_effectful_core="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/effectful-core-[0-9.]*')"
189+ echo "PKGDIR_effectful_core=${PKGDIR_effectful_core}" >> "$GITHUB_ENV"
187190 rm -f cabal.project cabal.project.local
188191 touch cabal.project
189192 touch cabal.project.local
190193 echo "packages: ${PKGDIR_effectful}" >> cabal.project
194+ echo "packages: ${PKGDIR_effectful_core}" >> cabal.project
191195 echo "package effectful" >> cabal.project
192196 echo " ghc-options: -Werror=missing-methods" >> cabal.project
197+ echo "package effectful-core" >> cabal.project
198+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
193199 cat >> cabal.project <<EOF
194200 package effectful
195201 flags: +benchmark-foreign-libraries
@@ -197,7 +203,7 @@ jobs:
197203 if $HEADHACKAGE; then
198204 echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
199205 fi
200− $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(effectful)$/; }' >> cabal.project.local
206+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(effectful|effectful-core)$/; }' >> cabal.project.local
201207 cat cabal.project
202208 cat cabal.project.local
203209 - name: dump install plan
@@ -227,12 +233,14 @@ jobs:
227233 run: |
228234 if [ $((HCNUMVER < 90200)) -ne 0 ] ; then cd ${PKGDIR_effectful} || false ; fi
229235 if [ $((HCNUMVER < 90200)) -ne 0 ] ; then doctest -XBangPatterns -XConstraintKinds -XDataKinds -XDeriveFunctor -XFlexibleContexts -XFlexibleInstances -XGADTs -XGeneralizedNewtypeDeriving -XLambdaCase -XMultiParamTypeClasses -XNoStarIsType -XRankNTypes -XRecordWildCards -XRoleAnnotations -XScopedTypeVariables -XStandaloneDeriving -XStrictData -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators src ; fi
230− if [ $((HCNUMVER < 90200)) -ne 0 ] ; then cd ${PKGDIR_effectful} || false ; fi
231− if [ $((HCNUMVER < 90200)) -ne 0 ] ; then doctest -XBangPatterns -XConstraintKinds -XDataKinds -XDeriveFunctor -XFlexibleContexts -XFlexibleInstances -XGADTs -XGeneralizedNewtypeDeriving -XLambdaCase -XMultiParamTypeClasses -XNoStarIsType -XRankNTypes -XRecordWildCards -XRoleAnnotations -XScopedTypeVariables -XStandaloneDeriving -XStrictData -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators utils ; fi
236+ if [ $((HCNUMVER < 90200)) -ne 0 ] ; then cd ${PKGDIR_effectful_core} || false ; fi
237+ if [ $((HCNUMVER < 90200)) -ne 0 ] ; then doctest -XBangPatterns -XConstraintKinds -XDataKinds -XDeriveFunctor -XFlexibleContexts -XFlexibleInstances -XGADTs -XGeneralizedNewtypeDeriving -XLambdaCase -XMultiParamTypeClasses -XNoStarIsType -XRankNTypes -XRecordWildCards -XRoleAnnotations -XScopedTypeVariables -XStandaloneDeriving -XStrictData -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators src ; fi
232238 - name: cabal check
233239 run: |
234240 cd ${PKGDIR_effectful} || false
235241 ${CABAL} -vnormal check
242+ cd ${PKGDIR_effectful_core} || false
243+ ${CABAL} -vnormal check
236244 - name: haddock
237245 run: |
238246 $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
README.md+15−1
@@ -100,11 +100,25 @@ to "boring" transformer stacks, most of which are a dozen of newtype'd `StateT`
100100or `ReaderT` transformers, each with a few associated operations (usually tied
101101to a type class), not to replace monad transformers altogether.
102102
103+## Usage
104+
105+The effect system and its effects are split among several libraries:
106+
107+- The `effectful-core` library contains the main machinery of the effect system
108+ itself and a few basic effects.
109+ It aims for a small dependency footprint and provides the building blocks for
110+ more advanced effects.
111+
112+- _TBD_ `effectful-resource`, `effectful-process`, ...
113+
114+- Finally, the `effectful` library which comes with 'batteries included'. It is
115+ build on top of the other libraries and re-exports the functionality of those.
116+
103117## Example
104118
105119A `Filesystem` effect with two handlers, one that runs in `IO` and another that
106120uses an in-memory virtual file system can be found
107−[here](https://github.com/arybczak/effectful/blob/master/examples/FileSystem.hs).
121+[here](https://github.com/arybczak/effectful/blob/master/effectful/examples/FileSystem.hs).
108122
109123## Resources
110124
cabal.projectnew file+3
@@ -0,0 +1,3 @@
1+packages:
2+ effectful/effectful.cabal
3+ effectful-core/effectful-core.cabal
doctest.sh+32−22
@@ -7,25 +7,35 @@
77# - Compile doctest with the same GHC version the project currently uses.
88#
99
10−doctest src \
11− -XBangPatterns \
12− -XConstraintKinds \
13− -XDataKinds \
14− -XDeriveFunctor \
15− -XFlexibleContexts \
16− -XFlexibleInstances \
17− -XGADTs \
18− -XGeneralizedNewtypeDeriving \
19− -XLambdaCase \
20− -XMultiParamTypeClasses \
21− -XNoStarIsType \
22− -XRankNTypes \
23− -XRecordWildCards \
24− -XRoleAnnotations \
25− -XScopedTypeVariables \
26− -XStandaloneDeriving \
27− -XStrictData \
28− -XTupleSections \
29− -XTypeApplications \
30− -XTypeFamilies \
31− -XTypeOperators
10+set -eu
11+
12+run_doctest() {
13+ pushd "${1}"
14+ doctest \
15+ "${2}" \
16+ -XBangPatterns \
17+ -XConstraintKinds \
18+ -XDataKinds \
19+ -XDeriveFunctor \
20+ -XFlexibleContexts \
21+ -XFlexibleInstances \
22+ -XGADTs \
23+ -XGeneralizedNewtypeDeriving \
24+ -XLambdaCase \
25+ -XMultiParamTypeClasses \
26+ -XNoStarIsType \
27+ -XRankNTypes \
28+ -XRecordWildCards \
29+ -XRoleAnnotations \
30+ -XScopedTypeVariables \
31+ -XStandaloneDeriving \
32+ -XStrictData \
33+ -XTupleSections \
34+ -XTypeApplications \
35+ -XTypeFamilies \
36+ -XTypeOperators
37+ popd
38+}
39+
40+run_doctest effectful src
41+run_doctest effectful-core src
effectful-core/CHANGELOG.mdnew file+2
@@ -0,0 +1,2 @@
1+# effectful-core-0.0.0.0 (2021-06-13)
2+* Initial alpha release.
effectful-core/LICENSEnew file+30
@@ -0,0 +1,30 @@
1+Copyright (c) 2021, Andrzej Rybczak
2+
3+All rights reserved.
4+
5+Redistribution and use in source and binary forms, with or without
6+modification, are permitted provided that the following conditions are met:
7+
8+ * Redistributions of source code must retain the above copyright
9+ notice, this list of conditions and the following disclaimer.
10+
11+ * Redistributions in binary form must reproduce the above
12+ copyright notice, this list of conditions and the following
13+ disclaimer in the documentation and/or other materials provided
14+ with the distribution.
15+
16+ * Neither the name of Andrzej Rybczak nor the names of other
17+ contributors may be used to endorse or promote products derived
18+ from this software without specific prior written permission.
19+
20+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
effectful-core/effectful-core.cabalnew file+100
@@ -0,0 +1,100 @@
1+cabal-version: 2.4
2+build-type: Simple
3+name: effectful-core
4+version: 0.0.0.0
5+license: BSD-3-Clause
6+license-file: LICENSE
7+category: Control
8+maintainer: andrzej@rybczak.net
9+author: Andrzej Rybczak
10+synopsis: An easy to use, performant extensible effects library.
11+
12+description: An easy to use, performant extensible effects library with seamless
13+ integration with the existing Haskell ecosystem.
14+ .
15+ This library provides the core of the effect system and is quiet
16+ minimal. If you look for something more sophisticated have a look
17+ at the @<https://hackage.haskell.org/package/effectful effectful>@
18+ package.
19+
20+extra-source-files: CHANGELOG.md
21+
22+tested-with: GHC ==8.8.4 || ==8.10.4 || ==9.0.1 || ==9.2.0.20210422
23+
24+bug-reports: https://github.com/arybczak/effectful/issues
25+source-repository head
26+ type: git
27+ location: https://github.com/arybczak/effectful.git
28+
29+common language
30+ ghc-options: -Wall -Wcompat
31+
32+ default-language: Haskell2010
33+
34+ default-extensions: BangPatterns
35+ ConstraintKinds
36+ DataKinds
37+ DeriveFunctor
38+ FlexibleContexts
39+ FlexibleInstances
40+ GADTs
41+ GeneralizedNewtypeDeriving
42+ LambdaCase
43+ MultiParamTypeClasses
44+ NoStarIsType
45+ RankNTypes
46+ RecordWildCards
47+ RoleAnnotations
48+ ScopedTypeVariables
49+ StandaloneDeriving
50+ StrictData
51+ TupleSections
52+ TypeApplications
53+ TypeFamilies
54+ TypeOperators
55+
56+library effectful-internal-utils
57+ import: language
58+
59+ build-depends: base
60+
61+ hs-source-dirs: utils
62+ c-sources: utils/utils.c
63+
64+ exposed-modules: Effectful.Internal.Utils
65+
66+library
67+ import: language
68+
69+ ghc-options: -O2
70+
71+ build-depends: base >= 4.13 && <5
72+ , containers
73+ , effectful-internal-utils
74+ , exceptions
75+ , monad-control
76+ , primitive
77+ , transformers-base
78+ , unliftio-core
79+
80+ hs-source-dirs: src
81+
82+ exposed-modules: Effectful.Error
83+ Effectful.Error.Dynamic
84+ Effectful.Fail
85+ Effectful.Handler
86+ Effectful.Internal.Effect
87+ Effectful.Internal.Env
88+ Effectful.Internal.Monad
89+ Effectful.Internal.Unlift
90+ Effectful.Monad
91+ Effectful.Reader
92+ Effectful.Reader.Dynamic
93+ Effectful.State.Dynamic
94+ Effectful.State.Local
95+ Effectful.State.Shared
96+ Effectful.Writer.Dynamic
97+ Effectful.Writer.Local
98+ Effectful.Writer.Shared
99+
100+ reexported-modules: Effectful.Internal.Utils
src/Effectful/Error.hs → effectful-core/src/Effectful/Error.hsrenamed

The content is the same.

src/Effectful/Error/Dynamic.hs → effectful-core/src/Effectful/Error/Dynamic.hsrenamed

The content is the same.

src/Effectful/Fail.hs → effectful-core/src/Effectful/Fail.hsrenamed

The content is the same.

src/Effectful/Handler.hs → effectful-core/src/Effectful/Handler.hsrenamed−1
@@ -267,4 +267,3 @@ localLiftUnliftIO (LocalEnv les) strategy k = case strategy of
267267
268268-- $setup
269269-- >>> import Control.Concurrent
270−-- >>> import Effectful
src/Effectful/Internal/Effect.hs → effectful-core/src/Effectful/Internal/Effect.hsrenamed

The content is the same.

src/Effectful/Internal/Env.hs → effectful-core/src/Effectful/Internal/Env.hsrenamed

The content is the same.

src/Effectful/Internal/Monad.hs → effectful-core/src/Effectful/Internal/Monad.hsrenamed

The content is the same.

src/Effectful/Internal/Unlift.hs → effectful-core/src/Effectful/Internal/Unlift.hsrenamed

The content is the same.

src/Effectful/Monad.hs → effectful-core/src/Effectful/Monad.hsrenamed

The content is the same.

src/Effectful/Reader.hs → effectful-core/src/Effectful/Reader.hsrenamed

The content is the same.

src/Effectful/Reader/Dynamic.hs → effectful-core/src/Effectful/Reader/Dynamic.hsrenamed

The content is the same.

src/Effectful/State/Dynamic.hs → effectful-core/src/Effectful/State/Dynamic.hsrenamed

The content is the same.

src/Effectful/State/Local.hs → effectful-core/src/Effectful/State/Local.hsrenamed

The content is the same.

src/Effectful/State/Shared.hs → effectful-core/src/Effectful/State/Shared.hsrenamed

The content is the same.

src/Effectful/Writer/Dynamic.hs → effectful-core/src/Effectful/Writer/Dynamic.hsrenamed

The content is the same.

src/Effectful/Writer/Local.hs → effectful-core/src/Effectful/Writer/Local.hsrenamed

The content is the same.

src/Effectful/Writer/Shared.hs → effectful-core/src/Effectful/Writer/Shared.hsrenamed

The content is the same.

utils/Effectful/Internal/Utils.hs → effectful-core/utils/Effectful/Internal/Utils.hsrenamed

The content is the same.

utils/utils.c → effectful-core/utils/utils.crenamed

The content is the same.

effectful/CHANGELOG.mdnew file+2
@@ -0,0 +1,2 @@
1+# effectful-0.0.0.0 (2021-06-13)
2+* Initial alpha release.
effectful/LICENSEnew file+30
@@ -0,0 +1,30 @@
1+Copyright (c) 2021, Andrzej Rybczak
2+
3+All rights reserved.
4+
5+Redistribution and use in source and binary forms, with or without
6+modification, are permitted provided that the following conditions are met:
7+
8+ * Redistributions of source code must retain the above copyright
9+ notice, this list of conditions and the following disclaimer.
10+
11+ * Redistributions in binary form must reproduce the above
12+ copyright notice, this list of conditions and the following
13+ disclaimer in the documentation and/or other materials provided
14+ with the distribution.
15+
16+ * Neither the name of Andrzej Rybczak nor the names of other
17+ contributors may be used to endorse or promote products derived
18+ from this software without specific prior written permission.
19+
20+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bench/Concurrency.hs → effectful/bench/Concurrency.hsrenamed

The content is the same.

bench/Countdown.hs → effectful/bench/Countdown.hsrenamed

The content is the same.

bench/FileSizes.hs → effectful/bench/FileSizes.hsrenamed

The content is the same.

bench/Main.hs → effectful/bench/Main.hsrenamed

The content is the same.

bench/Unlift.hs → effectful/bench/Unlift.hsrenamed

The content is the same.

bench/Utils.hs → effectful/bench/Utils.hsrenamed

The content is the same.

effectful.cabal → effectful/effectful.cabalrenamed+28−37
@@ -11,9 +11,13 @@ synopsis: An easy to use, performant extensible effects library.
1111
1212description: An easy to use, performant extensible effects library with seamless
1313 integration with the existing Haskell ecosystem.
14+ .
15+ This is the "batteries included" variant; See the
16+ @<https://hackage.haskell.org/package/effectful-core effectful-core>@
17+ package for the effect system itself as well as the various other
18+ @effectful-*@ packages if you need a smaller dependency footprint.
1419
1520extra-source-files: CHANGELOG.md
16− README.md
1721
1822tested-with: GHC ==8.8.4 || ==8.10.4 || ==9.0.1 || ==9.2.0.20210422
1923
@@ -53,16 +57,6 @@ common language
5357 TypeFamilies
5458 TypeOperators
5559
56−library effectful-internal-utils
57− import: language
58−
59− build-depends: base
60−
61− hs-source-dirs: utils
62− c-sources: utils/utils.c
63−
64− exposed-modules: Effectful.Internal.Utils
65−
6660library
6761 import: language
6862
@@ -70,40 +64,34 @@ library
7064
7165 build-depends: base >= 4.13 && <5
7266 , async
73− , containers
74− , effectful-internal-utils
75− , exceptions
76− , monad-control
77− , primitive
67+ , effectful-core
7868 , resourcet
79− , transformers-base
80− , unliftio-core
8169 , unliftio
8270
8371 hs-source-dirs: src
8472
8573 exposed-modules: Effectful
8674 Effectful.Async
87− Effectful.Error
88− Effectful.Error.Dynamic
89− Effectful.Fail
90− Effectful.Handler
91− Effectful.Internal.Effect
92− Effectful.Internal.Env
93− Effectful.Internal.Monad
94− Effectful.Internal.Unlift
95− Effectful.Monad
96− Effectful.Reader
97− Effectful.Reader.Dynamic
9875 Effectful.Resource
99− Effectful.State.Dynamic
100− Effectful.State.Local
101− Effectful.State.Shared
102− Effectful.Writer.Dynamic
103− Effectful.Writer.Local
104− Effectful.Writer.Shared
10576
106− reexported-modules: Effectful.Internal.Utils
77+ reexported-modules: Effectful.Error
78+ , Effectful.Error.Dynamic
79+ , Effectful.Fail
80+ , Effectful.Handler
81+ , Effectful.Internal.Effect
82+ , Effectful.Internal.Env
83+ , Effectful.Internal.Monad
84+ , Effectful.Internal.Unlift
85+ , Effectful.Internal.Utils
86+ , Effectful.Monad
87+ , Effectful.Reader
88+ , Effectful.Reader.Dynamic
89+ , Effectful.State.Dynamic
90+ , Effectful.State.Local
91+ , Effectful.State.Shared
92+ , Effectful.Writer.Dynamic
93+ , Effectful.Writer.Local
94+ , Effectful.Writer.Shared
10795
10896test-suite test
10997 import: language
@@ -119,7 +107,7 @@ test-suite test
119107 , tasty-hunit
120108 , unliftio
121109
122− hs-source-dirs: tests
110+ hs-source-dirs: tests examples
123111
124112 type: exitcode-stdio-1.0
125113 main-is: Main.hs
@@ -129,6 +117,9 @@ test-suite test
129117 ErrorTests
130118 StateTests
131119 Utils
120+ -- These are examples; We do not actually run them but list
121+ -- them here in order to check if they compile.
122+ FileSystem
132123
133124benchmark bench
134125 import: language
examples/FileSystem.hs → effectful/examples/FileSystem.hsrenamed+2−2
@@ -44,7 +44,7 @@ runFileSystemIO
4444 :: (IOE :> es, Error FsError :> es)
4545 => Eff (FileSystem : es) a
4646 -> Eff es a
47−runFileSystemIO = interpret $ \case
47+runFileSystemIO = interpret $ \_ -> \case
4848 ReadFile path -> adapt $ IO.readFile path
4949 WriteFile path contents -> adapt $ IO.writeFile path contents
5050 where
@@ -55,7 +55,7 @@ runFileSystemPure
5555 => M.Map FilePath String
5656 -> Eff (FileSystem : es) a
5757 -> Eff es a
58−runFileSystemPure fs0 = reinterpret (evalState fs0) $ \case
58+runFileSystemPure fs0 = reinterpret (evalState fs0) $ \_ -> \case
5959 ReadFile path -> gets (M.lookup path) >>= \case
6060 Just contents -> pure contents
6161 Nothing -> throwError . FsError $ "File not found: " ++ show path
src/Effectful.hs → effectful/src/Effectful.hsrenamed

The content is the same.

src/Effectful/Async.hs → effectful/src/Effectful/Async.hsrenamed

The content is the same.

src/Effectful/Resource.hs → effectful/src/Effectful/Resource.hsrenamed

The content is the same.

tests/AsyncTests.hs → effectful/tests/AsyncTests.hsrenamed

The content is the same.

tests/ConcurrencyTests.hs → effectful/tests/ConcurrencyTests.hsrenamed

The content is the same.

tests/ErrorTests.hs → effectful/tests/ErrorTests.hsrenamed

The content is the same.

tests/Main.hs → effectful/tests/Main.hsrenamed

The content is the same.

tests/StateTests.hs → effectful/tests/StateTests.hsrenamed

The content is the same.

tests/Utils.hs → effectful/tests/Utils.hsrenamed

The content is the same.