packages feed

mtl-evil-instances

Instances for the mtl classes for all monad transformers.

view on Hackage

WARNING: THIS PACKAGE IS EVIL. DO NOT USE IT! It is common when defining a monad transformer to define instances for that transformer for each class in the @mtl@ library, to allow easy composition with the existing standard monad transformers. However, doing this is very tedious, and actually unnecessary, given that most of these instances across different transformers are identical, and can actually be expressed purely in terms of @MonadTrans@, or @MonadTransControl@ (from the @monad-control@ package) for the more complicated classes. The reason this is not generally done is because it requires the @OverlappingInstances@ extension, which is generally considered evil. However, it does actually work. If you define a monad transformer, and instances for @MonadTrans@ and @MonadTransControl@, and import "Control.Monad.Instances.Overlapping", your monad transformer will magically have sensible instances for all the @mtl@ type classes. And if you don't like one of the instances provided, you can always define your own instance, which will override the \"default\" one provided by this package, because by the rules for @OverlappingInstances@, your instance is more \"specific\" than the one exported by "Control.Monad.Instances.Overlapping". The main disadvantage of this is that errors in code using @OverlappingInstances@ can result in some really strange error messages that are not very helpful. The reason this is evil is because this places an additional burden (of dealing with confusing error messages) not just on those who use this package directly, but anybody who indirectly uses any code that, somewhere down the line, imported "Control.Monad.Instances.Overlapping", due to the \"viral\" nature of instances. Also, if another person were to make a package very similar to this one, and somebody ended up importing both code that used this package, and code that used the other package, than neither of them would work anymore. This is the problem with orphan instances. If you absolutely insist on using this code, you should probably define manual instances for the @mtl@ classes the hard way as well, to avoid this kind of breakage (thus defeating the purpose of this package). Of course, realistically, this package is for everyone who wishes to ignore all such advice and do bad things anyway (including myself). This is my gift to you!
versionuploadeduploaderchanges
0.12012-02-29 14:52 UTCShaneOBrien+264/−0 lines, 5 filesdep +basedep +monad-controldep +mtlsetup-changed

Dependencies of mtl-evil-instances-0.1

base >4 && <5 4.22.0.0 → 4.22.1.0
2026-12-01 12:38 UTC4.22.1.0+388/−6 lines, 9 filesdep ~ghc-internalPVP: major bump suggested
2025-12-19 11:52 UTC4.22.0.0+886/−215 lines, 28 filesdep ~ghc-internalPVP ok
2026-03-27 12:26 UTC4.21.2.0+10/−3 lines, 4 filesdep ~ghc-internalPVP ok
2025-12-27 10:31 UTC4.21.1.0+17/−5 lines, 4 filesdep ~ghc-internalPVP ok
2024-12-16 09:24 UTC4.21.0.0+1170/−396 lines, 39 filesdep ~ghc-internalPVP ok

showing 5 of 61 versions

monad-control >0.3 && <0.4 0.3.3.1 → 1.0.3.1 newer than bounds
2021-08-02 10:16 UTC1.0.3.1 newer than bounds+25/−13 lines, 3 filesdep ~transformersPVP ok
2021-07-26 20:03 UTC1.0.3 newer than bounds+6/−2 lines, 2 filesdep ~base
2021-07-26 19:56 UTC1.0.2.4 newer than bounds+912/−894 lines, 5 filesdep ~basedep ~transformers-compatsetup-changednew-uploader
2018-02-26 08:14 UTC1.0.2.3 newer than bounds+10/−3 lines, 3 filesdep ~transformers-compatPVP: major bump suggested
2017-08-06 15:12 UTC1.0.2.2 newer than bounds+201/−29 lines, 4 filesPVP ok

showing 5 of 32 versions

mtl >2 && <2.1 2.0.1.1 → 2.3.2 newer than bounds
2025-12-08 04:58 UTC2.3.2 newer than bounds+112/−21 lines, 12 filesdep ~basenew-uploaderPVP: major bump suggested
2022-10-31 21:28 UTC2.3.1 newer than bounds+188/−33 lines, 8 filesdep ~basePVP: major bump suggested
2022-05-07 20:34 UTC2.3 newer than bounds+1284/−520 lines, 29 filesdep ~basedep ~transformersnew-uploaderPVP ok
2018-02-24 22:15 UTC2.2.2 newer than bounds+152/−36 lines, 14 filesdep ~basePVP: major bump suggested
2014-06-02 02:22 UTC2.2.1 newer than bounds+179/−4 lines, 8 filesdep ~basedep ~transformersPVP: major bump suggested

showing 5 of 20 versions

transformers >0.2 && <0.3 0.2.2.1 → 0.6.3.0 newer than bounds
2026-01-12 12:42 UTC0.6.3.0 newer than bounds+28/−1 lines, 4 filesPVP: major bump suggested
2025-04-06 22:39 UTC0.6.2.0 newer than bounds+41/−42 lines, 8 filesdep ~ghc-primPVP: major bump suggested
2024-09-25 11:37 UTC0.6.1.2 newer than bounds+70/−21 lines, 19 filesPVP: minor bump suggested
2023-08-01 19:13 UTC0.6.1.1 newer than bounds+281/−42 lines, 11 filesPVP ok
2023-02-04 08:15 UTC0.6.1.0 newer than bounds+64/−4 lines, 8 filesPVP ok

showing 5 of 42 versions

transformers-base >0.1 && <0.5 0.4.6 → 0.4.6.1
2026-03-09 18:21 UTC0.4.6.1+11/−5 lines, 3 filesPVP: major bump suggested
2021-08-01 21:25 UTC0.4.6+21/−5 lines, 2 filesdep ~transformersPVP: major bump suggested
2018-03-31 21:50 UTC0.4.5.2+2/−8 lines, 2 filesdep ~transformers-compatPVP ok
2018-03-31 19:33 UTC0.4.5.1+7/−1 lines, 2 filesPVP ok
2018-03-31 16:40 UTC0.4.5+39/−16 lines, 3 filesdep +base-orphansdep ~basedep ~transformers-compatPVP: major bump suggested

showing 5 of 14 versions

Reverse dependencies

2 packages depend on mtl-evil-instances

monad-exception 0.1 requires mtl-evil-instances <0.2
resource-simple 0.2 requires mtl-evil-instances <0.2