git.iko.soy/typeable/control-has
on master help sign in
Fix compilation on GHC 8.2-8.6 due to MonadFail

Older GHC don't support DerivingStrategies

commit8dc5474d6a04015302bc642205a4dc999d21e97a authormniip <mniip@users.noreply.github.com> dateTue 7 Oct 2025, 13:17 (1 year ago) parentb9aa959
2 files changed+43−34
unifiedsplit
control-has.cabal+39−34 src/Control/EnvT.hs+4
control-has.cabal+39−34
@@ -1,36 +1,41 @@
1−cabal-version: 2.4
2−name: control-has
3−version: 0.2.0.0
4−synopsis: Typeclass for things that have parts
5−license-file: LICENSE
6−build-type: Simple
1+cabal-version: 2.4
2+name: control-has
3+version: 0.2.0.0
4+synopsis: Typeclass for things that have parts
5+license-file: LICENSE
6+build-type: Simple
77
88library
9− hs-source-dirs: src
10− ghc-options: -Wall
11− exposed-modules: Control.Has
12− Control.EnvT
13− build-depends: base
14− , exceptions
15− , lens
16− , monad-control
17− , mtl
18− , resourcet
19− , transformers-base
20− default-language: Haskell2010
21− default-extensions: ConstraintKinds
22− , DataKinds
23− , DefaultSignatures
24− , DerivingStrategies
25− , FlexibleContexts
26− , FlexibleInstances
27− , FunctionalDependencies
28− , GADTs
29− , GeneralizedNewtypeDeriving
30− , KindSignatures
31− , RankNTypes
32− , StandaloneDeriving
33− , TypeOperators
34− , TypeFamilies
35− , UndecidableInstances
36− , UndecidableSuperClasses
9+ hs-source-dirs: src
10+ ghc-options: -Wall
11+ exposed-modules:
12+ Control.EnvT
13+ Control.Has
14+
15+ build-depends:
16+ , base >=4.10
17+ , exceptions
18+ , lens
19+ , monad-control
20+ , mtl
21+ , resourcet
22+ , transformers-base
23+
24+ default-language: Haskell2010
25+ default-extensions:
26+ ConstraintKinds
27+ DataKinds
28+ DefaultSignatures
29+ DerivingStrategies
30+ FlexibleContexts
31+ FlexibleInstances
32+ FunctionalDependencies
33+ GADTs
34+ GeneralizedNewtypeDeriving
35+ KindSignatures
36+ RankNTypes
37+ StandaloneDeriving
38+ TypeFamilies
39+ TypeOperators
40+ UndecidableInstances
41+ UndecidableSuperClasses
src/Control/EnvT.hs+4
@@ -24,6 +24,10 @@ import Control.Monad
2424import Control.Monad.Fix
2525#endif
2626
27+#if !MIN_VERSION_base(4,13,0)
28+import Control.Monad.Fail
29+#endif
30+
2731-- | The only reason this exists is that there are a lot of instances for
2832-- 'EnvT, which simply pass the implementation to the inner 'm'
2933-- such as 'MonadLogger'.