packages/transformers.git
5 months agogeneralize except (suggested by Simon Hengel) master
Ross Paterson [Wed, 9 Jan 2019 23:33:50 +0000 (23:33 +0000)] 
generalize except (suggested by Simon Hengel)

5 months agoMake compatible with upcoming base-4.13
hvr [Wed, 19 Dec 2018 09:56:30 +0000 (09:56 +0000)] 
Make compatible with upcoming base-4.13

See also https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail

6 months agocontinuation-passing versions of Writer and RWS by minad (fixes #31)
Ross Paterson [Thu, 22 Nov 2018 07:44:58 +0000 (07:44 +0000)] 
continuation-passing versions of Writer and RWS by minad (fixes #31)
copied from the writer-cps-transformers package with formatting tweaks

8 months agoFix ReaderT's kind
"Samuel Gélineau" [Mon, 24 Sep 2018 12:58:48 +0000 (12:58 +0000)] 
Fix ReaderT's kind

ReaderT's kind was * -> (k -> *) -> k -> *, but this was clearly a
mistake, since monads have kind (* -> *).

9 months agofix doc of Control.Monad.Trans.Except.catchE (fixes #59)
Ross Paterson [Thu, 6 Sep 2018 11:30:21 +0000 (11:30 +0000)] 
fix doc of Control.Monad.Trans.Except.catchE (fixes #59)

13 months agoMigrate Contravariant instances
ryan.gl.scott [Thu, 19 Apr 2018 21:02:38 +0000 (21:02 +0000)] 
Migrate Contravariant instances

These were originally defined in the contravariant library. The
Data.Contravariant module will be moved to base in base-4.12
(GHC 8.6), so this commit moves the corresponding instances to
transformers to accommodate the migration.

14 months agoadd pointer to monadic parser article to example
Ross Paterson [Wed, 21 Mar 2018 18:27:26 +0000 (18:27 +0000)] 
add pointer to monadic parser article to example

18 months agodoc grammar fix (#46)
Ross Paterson [Sat, 25 Nov 2017 17:29:18 +0000 (17:29 +0000)] 
doc grammar fix (#46)

20 months agoinstance MonadFix m => MonadFix (ListT m)
Ross Paterson [Sun, 15 Oct 2017 22:45:06 +0000 (22:45 +0000)] 
instance MonadFix m => MonadFix (ListT m)

by M Farkas-Dyck
(but note that ListT is deprecated)

20 months agobump minor version number
Ross Paterson [Wed, 4 Oct 2017 15:58:31 +0000 (15:58 +0000)] 
bump minor version number

20 months agoDefine custom (*>) for various transformers to fix space leaks (fixes #33)
Ross Paterson [Wed, 4 Oct 2017 15:50:40 +0000 (15:50 +0000)] 
Define custom (*>) for various transformers to fix space leaks (fixes #33)

from Andrzej Rybczak

21 months agoCanonicalise Monad instances again (fixes #45)
Ross Paterson [Sat, 2 Sep 2017 10:25:47 +0000 (10:25 +0000)] 
Canonicalise Monad instances again (fixes #45)

From Herbert Valerio Riedel

This fixes a minor regression causing validation errors in GHC HEAD

22 months agoExplain the acryonym "CPS" in the first place it is used
ch.martin [Sat, 12 Aug 2017 03:59:25 +0000 (03:59 +0000)] 
Explain the acryonym "CPS" in the first place it is used

21 months agoAdd missing Semigroup instance to `Constant` functor (fixes #44)
Ross Paterson [Sat, 2 Sep 2017 08:55:03 +0000 (08:55 +0000)] 
Add missing Semigroup instance to `Constant` functor (fixes #44)

From Herbert Valerio Riedel

This is needed for moving forward with
https://prime.haskell.org/wiki/Libraries/Proposals/SemigroupMonoid

2 years agorename heading for consistency
Ross Paterson [Mon, 8 May 2017 16:53:12 +0000 (16:53 +0000)] 
rename heading for consistency

2 years agoadd mapSelect and mapSelectT
Ross Paterson [Mon, 8 May 2017 16:51:48 +0000 (16:51 +0000)] 
add mapSelect and mapSelectT

2 years agorename selectToCont to selectToContT for consistency
Ross Paterson [Mon, 8 May 2017 16:48:54 +0000 (16:48 +0000)] 
rename selectToCont to selectToContT for consistency

2 years agodirect definition of pure/return for MaybeT (fixes #39)
Ross Paterson [Sun, 2 Apr 2017 08:33:10 +0000 (08:33 +0000)] 
direct definition of pure/return for MaybeT (fixes #39)

2 years agobump minor version (migrated instances) 0_5_4_0
Ross Paterson [Sat, 18 Feb 2017 16:44:56 +0000 (16:44 +0000)] 
bump minor version (migrated instances)

2 years agofix for pre-AMP environments
Ross Paterson [Sat, 18 Feb 2017 12:33:17 +0000 (12:33 +0000)] 
fix for pre-AMP environments

2 years agobump minor version number
Ross Paterson [Sat, 18 Feb 2017 01:25:18 +0000 (01:25 +0000)] 
bump minor version number

2 years agoremove mention of Control.Monad.IO.Class (now in base)
Ross Paterson [Sat, 18 Feb 2017 01:22:46 +0000 (01:22 +0000)] 
remove mention of Control.Monad.IO.Class (now in base)

2 years agodeprecate Control.Monad.Trans.List
Ross Paterson [Fri, 17 Feb 2017 13:05:59 +0000 (13:05 +0000)] 
deprecate Control.Monad.Trans.List

2 years agoadd SelectT monad transformer
Ross Paterson [Fri, 17 Feb 2017 00:01:18 +0000 (00:01 +0000)] 
add SelectT monad transformer

2 years agomake runAccumT a separate function
Ross Paterson [Thu, 16 Feb 2017 20:25:36 +0000 (20:25 +0000)] 
make runAccumT a separate function

2 years agoadd INLINE pragma
Ross Paterson [Thu, 16 Feb 2017 10:54:22 +0000 (10:54 +0000)] 
add INLINE pragma

2 years agoadd elimLift, suggested by Baldur Blöndal
Ross Paterson [Thu, 16 Feb 2017 10:31:03 +0000 (10:31 +0000)] 
add elimLift, suggested by Baldur Blöndal

2 years agodefine (*>) = (>>) for both StateT's (#33)
Ross Paterson [Mon, 6 Feb 2017 00:14:31 +0000 (00:14 +0000)] 
define (*>) = (>>) for both StateT's (#33)

2 years agoadd eitherToErrors (#35)
Ross Paterson [Sun, 5 Feb 2017 23:52:47 +0000 (23:52 +0000)] 
add eitherToErrors (#35)

2 years agoMigrate Bifoldable and Bitraversable instances for Constant
ryan.gl.scott [Fri, 16 Dec 2016 02:23:53 +0000 (02:23 +0000)] 
Migrate Bifoldable and Bitraversable instances for Constant

These were originally defined in the bifunctors library. The Data.Bifoldable
and Data.Bitraversable modules will be moved to base in base-4.10, so this
commit moves the corresponding instances for Constant to transformers to
accommodate the migration.

2 years agoMonad (and related) instances for Reverse
Ross Paterson [Sun, 6 Nov 2016 17:36:25 +0000 (17:36 +0000)] 
Monad (and related) instances for Reverse
(suggested by David Feuer) inhirited from the underlying monad

2 years agospecialized null and length methods where possible
Ross Paterson [Sun, 6 Nov 2016 17:26:04 +0000 (17:26 +0000)] 
specialized null and length methods where possible

2 years agoremove definition of sequenceA for Reverse
Ross Paterson [Sat, 5 Nov 2016 01:58:19 +0000 (01:58 +0000)] 
remove definition of sequenceA for Reverse
(suggested by David Feuer) The default definition in terms of traverse
avoids an extra fmap, which may be expensive for some containers.

2 years agospecialize methods for ReaderT
Ross Paterson [Wed, 19 Oct 2016 09:42:50 +0000 (09:42 +0000)] 
specialize methods for ReaderT
Add definitions of (<$), (*>), (<*) and (>>) using the corresponding
methods on the inner functor.

3 years agosimplify return defn; consistent lazy matching; whitespace
Ross Paterson [Thu, 28 Apr 2016 15:15:22 +0000 (15:15 +0000)] 
simplify return defn; consistent lazy matching; whitespace

3 years agorename monad transformations for consistency, and generalize them from Monad to Functor
Ross Paterson [Wed, 27 Apr 2016 15:48:32 +0000 (15:48 +0000)] 
rename monad transformations for consistency, and generalize them from Monad to Functor

3 years agoFix export list and warnings
nickolay.kudasov [Tue, 26 Apr 2016 23:35:49 +0000 (23:35 +0000)] 
Fix export list and warnings

3 years agoAdd AccumT monad transformer (see #24)
nickolay.kudasov [Tue, 26 Apr 2016 23:26:47 +0000 (23:26 +0000)] 
Add AccumT monad transformer (see #24)

3 years agoBackport Eq1/Ord1/Read1/Show1 instances for Proxy
ryan.gl.scott [Sun, 17 Apr 2016 15:35:36 +0000 (15:35 +0000)] 
Backport Eq1/Ord1/Read1/Show1 instances for Proxy

These instances were added in `base-4.9` (see
http://git.haskell.org/ghc.git/commit/5097f3802124cfbe6810bff8110df91d4c52096b)

3 years agoBackport Num/Bits/IsString/etc. instances for Identity
ryan.gl.scott [Mon, 11 Apr 2016 14:01:55 +0000 (14:01 +0000)] 
Backport Num/Bits/IsString/etc. instances for Identity

These instances were added in `base-4.9`
(see http://git.haskell.org/ghc.git/commit/8b57cac5974c9fffccbcae3104b5b5d18760749e)

3 years agoupdate changelog for 0.5.2.0 0_5_2_0
Ross Paterson [Wed, 17 Feb 2016 10:38:37 +0000 (10:38 +0000)] 
update changelog for 0.5.2.0

3 years agobump minor version (orphan instances re-added)
Ross Paterson [Wed, 17 Feb 2016 10:34:48 +0000 (10:34 +0000)] 
bump minor version (orphan instances re-added)

3 years agoadd INLINE pragmas
Ross Paterson [Tue, 16 Feb 2016 11:07:58 +0000 (11:07 +0000)] 
add INLINE pragmas

(suggested by Oliver Charles)

3 years agore-instate orphan instances Alternative (Either e) and MonadPlus (Either e) (fixes...
Ross Paterson [Thu, 11 Feb 2016 18:20:27 +0000 (18:20 +0000)] 
re-instate orphan instances Alternative (Either e) and MonadPlus (Either e) (fixes #22)

3 years agodocument unusualness of contT
Ross Paterson [Thu, 11 Feb 2016 18:18:25 +0000 (18:18 +0000)] 
document unusualness of contT

3 years agodocument lift as a natural transformation in the category of monads
Ross Paterson [Thu, 11 Feb 2016 18:17:38 +0000 (18:17 +0000)] 
document lift as a natural transformation in the category of monads

3 years agoBump minor version number to 0.5.1.0, required by added instances 0_5_1_0
Ross Paterson [Sun, 17 Jan 2016 15:47:13 +0000 (15:47 +0000)] 
Bump minor version number to 0.5.1.0, required by added instances

3 years agopathch-level release 0.5.0.2
Ross Paterson [Sun, 17 Jan 2016 02:39:49 +0000 (02:39 +0000)] 
pathch-level release 0.5.0.2

3 years agopatch-level release
Ross Paterson [Sun, 17 Jan 2016 02:25:44 +0000 (02:25 +0000)] 
patch-level release

3 years agoRequire GHC >= 7.0 for DeriveDataTypeable (fixes #19)
Ross Paterson [Sun, 17 Jan 2016 02:21:58 +0000 (02:21 +0000)] 
Require GHC >= 7.0 for DeriveDataTypeable (fixes #19)
It seems it was buggy in 6.12.

3 years agoRequire GHC >= 7.6 for PolyKinds (fixes #20)
Ross Paterson [Sun, 17 Jan 2016 01:57:21 +0000 (01:57 +0000)] 
Require GHC >= 7.6 for PolyKinds (fixes #20)

3 years agoBackport Bounded, Enum, Ix, and Storable instances for Identity
ryan.gl.scott [Tue, 22 Dec 2015 00:14:03 +0000 (00:14 +0000)] 
Backport Bounded, Enum, Ix, and Storable instances for Identity

These instances were added to `base-4.9.0.0`

3 years agominor changelog cleanup 0_5_0_0
Ross Paterson [Thu, 17 Dec 2015 17:40:40 +0000 (17:40 +0000)] 
minor changelog cleanup

3 years agosimply Cabal file a little
Ross Paterson [Thu, 17 Dec 2015 17:31:48 +0000 (17:31 +0000)] 
simply Cabal file a little

3 years agoConditionally expose Data.Functor.* modules
ryan.gl.scott [Thu, 17 Dec 2015 17:09:19 +0000 (17:09 +0000)] 
Conditionally expose Data.Functor.* modules

As a part of #11135. This conditionally exposes `Data.Functor.Classes`, `Data.Functor.Compose`, `Data.Functor.Product`, and `Data.Functor.Sum` if using GHC 7.10 or earlier. This also backports `Typeable`, `Data`, `Generic`, and `Generic1` instances that will be introduced in `base-4.9.0.0` (GHC 8.0).

3 years agobump version number in preparation for release
Ross Paterson [Wed, 16 Dec 2015 13:53:02 +0000 (13:53 +0000)] 
bump version number in preparation for release

3 years agomore uniform treatment of Read1/Show1/Read2/Show2
Ross Paterson [Wed, 16 Dec 2015 13:48:26 +0000 (13:48 +0000)] 
more uniform treatment of Read1/Show1/Read2/Show2

Now there are two methods in each class, corresponding to the methods
in the basic classes, and each of the lifting functions takes pairs of
function arguments.  The lifting functions (which have not appeared in
any release) are renamed from xxxWith to liftXxx, to avoid a clash with
showListWith (from Text.Show).

3 years agoupdate changelog
Ross Paterson [Tue, 15 Dec 2015 19:42:34 +0000 (19:42 +0000)] 
update changelog

3 years agoChange definitions of Read1 and Show1 to allow correct list instances
Ross Paterson [Wed, 16 Dec 2015 00:01:44 +0000 (00:01 +0000)] 
Change definitions of Read1 and Show1 to allow correct list instances

The Read1 and Show1 classes did not allow special cases for lists as
supported by the base classes Read and Show.  Thus for example the
following displayed incorrectly:

Backwards "abc"
Compose (Just "abc")

see also https://ghc.haskell.org/trac/ghc/ticket/11135

To fix this requires an extra argument to the methods in Read1 and Show1,
effectively taking explicit dictionaries with two entries, like the base
classes.

3 years agoadd MonadFail instance for ContT
Ross Paterson [Wed, 25 Nov 2015 13:19:55 +0000 (13:19 +0000)] 
add MonadFail instance for ContT

3 years agore-order methods for consistency
Ross Paterson [Wed, 25 Nov 2015 12:00:01 +0000 (12:00 +0000)] 
re-order methods for consistency

3 years agoAdd `MonadFail` instances
hvr [Tue, 24 Nov 2015 20:06:03 +0000 (20:06 +0000)] 
Add `MonadFail` instances

This adds `MonadFail` instances for all `Monad` instances
which explicitly define a `fail` method.

3 years agoCanonicalise Monad instances
hvr [Tue, 24 Nov 2015 14:44:19 +0000 (14:44 +0000)] 
Canonicalise Monad instances

This exploits the AMP by omitting the `return` definition
and makes the code future proof.
Moreover, this makes `transformers` warning-free under
GHC 8's new `-fwarn-noncanonical-monad-instances` warning.

3 years agoinstance Bifunctor Constant (fixes #11)
Ross Paterson [Fri, 20 Nov 2015 12:27:58 +0000 (12:27 +0000)] 
instance Bifunctor Constant (fixes #11)

3 years agoProper base bounds (for real), backport Monoid Identity instance
ryan.gl.scott [Wed, 28 Oct 2015 03:40:19 +0000 (03:40 +0000)] 
Proper base bounds (for real), backport Monoid Identity instance

It has finally been decided that GHC 8.0 will ship with base-4.9.0.0, so we
should follow that convention. Also, let's backport the Monoid (Identity a)
instance that was introduced in GHC 8.0.

3 years agoFix `base` lower version bounds for GHC 8.0 (it will be `4.8.2` at the least)
ryan.gl.scott [Sat, 10 Oct 2015 14:35:46 +0000 (14:35 +0000)] 
Fix `base` lower version bounds for GHC 8.0 (it will be `4.8.2` at the least)

3 years agorename legacy source directories
Ross Paterson [Mon, 28 Sep 2015 00:28:06 +0000 (00:28 +0000)] 
rename legacy source directories

3 years agore-add old modules
Ross Paterson [Mon, 28 Sep 2015 00:18:25 +0000 (00:18 +0000)] 
re-add old modules

3 years agoSeparate legacy modules into different subdirectories
ryan.gl.scott [Sun, 27 Sep 2015 23:41:01 +0000 (23:41 +0000)] 
Separate legacy modules into different subdirectories

`Cabal` gets confused when it has to conditionally include two different files
in the same subdirectory using different `impl(ghc >= <num>)` flags, so we
place `Data.Functor.Identity` into the `old709` directory and
`Control.Monad.IO.Class` into the `old711` directory to appease `Cabal`.

3 years agoconditionally re-instate orphan instances in Control.Monad.Trans.Error
Ross Paterson [Sun, 27 Sep 2015 17:21:45 +0000 (17:21 +0000)] 
conditionally re-instate orphan instances in Control.Monad.Trans.Error

see GHC trac #10755

need to check the version of base required

3 years agodocumentation tweak
Ross Paterson [Sun, 27 Sep 2015 15:57:28 +0000 (15:57 +0000)] 
documentation tweak

4 years agoFix the last MonadTrans example to use IO instead of []
samcaldwell [Wed, 27 Aug 2014 03:03:02 +0000 (03:03 +0000)] 
Fix the last MonadTrans example to use IO instead of []

3 years agoMake Control.Monad.IO.Class conditionally exposed
ryan.gl.scott [Sat, 15 Aug 2015 14:52:17 +0000 (14:52 +0000)] 
Make Control.Monad.IO.Class conditionally exposed
Trac #10773 proposed moving the `MonadIO` class (and, as a result, the
`Control.Monad.IO.Class` module) to `base` to make it easier to generalize
more functions' type signatures from `IO` to `MonadIO`. To aid this transition,
`transformers` should continue to provide `Control.Monad.IO.Class` if compiled
with GHC 7.10 or earlier.

3 years agofix warning
Ross Paterson [Fri, 3 Jul 2015 21:59:05 +0000 (21:59 +0000)] 
fix warning

3 years agoTypeable instance for promoted Identity constructor
ryan.gl.scott [Tue, 30 Jun 2015 15:04:02 +0000 (15:04 +0000)] 
Typeable instance for promoted Identity constructor

3 years agoFix build on GHC < 7.10
ryan.gl.scott [Tue, 30 Jun 2015 14:56:40 +0000 (14:56 +0000)] 
Fix build on GHC < 7.10

3 years agoexpand definitions of Applicative and Alternative methods (fixes #4)
Ross Paterson [Sun, 21 Jun 2015 14:17:15 +0000 (14:17 +0000)] 
expand definitions of Applicative and Alternative methods (fixes #4)

4 years agoMore use of PolyKinds
ryan.gl.scott [Sat, 13 Jun 2015 03:35:05 +0000 (03:35 +0000)] 
More use of PolyKinds

4 years agoadd Monoid (Constant a b) instance
Ross Paterson [Thu, 11 Jun 2015 21:55:20 +0000 (21:55 +0000)] 
add Monoid (Constant a b) instance

4 years agoMark modules as Safe
ryan.gl.scott [Thu, 21 May 2015 14:46:42 +0000 (14:46 +0000)] 
Mark modules as Safe

4 years agoremove orphan instances from deprecated Control.Monad.Trans.Error (resolves #2)
Ross Paterson [Fri, 24 Apr 2015 16:47:49 +0000 (16:47 +0000)] 
remove orphan instances from deprecated Control.Monad.Trans.Error (resolves #2)

4 years agoremove MonadZip instance from deprecated module
Ross Paterson [Fri, 24 Apr 2015 16:42:03 +0000 (16:42 +0000)] 
remove MonadZip instance from deprecated module

4 years agoadd bug-reports line to Cabal file
Ross Paterson [Fri, 24 Apr 2015 15:12:49 +0000 (15:12 +0000)] 
add bug-reports line to Cabal file

4 years agobump test for AutoDeriveTypeable to GHC 7.10, since that's been released
Ross Paterson [Thu, 23 Apr 2015 11:18:26 +0000 (11:18 +0000)] 
bump test for AutoDeriveTypeable to GHC 7.10, since that's been released

4 years agouse PolyKinds for GHC >= 7.4
Ross Paterson [Wed, 22 Apr 2015 23:48:45 +0000 (23:48 +0000)] 
use PolyKinds for GHC >= 7.4

4 years agorequire a more general type for eqWith and compareWith
Ross Paterson [Wed, 22 Apr 2015 22:10:12 +0000 (22:10 +0000)] 
require a more general type for eqWith and compareWith

4 years agoMonadZip instaces, base-4.8.0.0 compatibility with Identity
ryan.gl.scott [Mon, 13 Apr 2015 18:52:37 +0000 (18:52 +0000)] 
MonadZip instaces, base-4.8.0.0 compatibility with Identity

4 years agomove eq1, etc out of the classes
Ross Paterson [Wed, 25 Mar 2015 23:57:06 +0000 (23:57 +0000)] 
move eq1, etc out of the classes

4 years agofix warnings
Ross Paterson [Wed, 25 Mar 2015 23:53:22 +0000 (23:53 +0000)] 
fix warnings

4 years agoinstances of Eq2, Ord2, Read2 and Show2
Ross Paterson [Wed, 25 Mar 2015 21:44:56 +0000 (21:44 +0000)] 
instances of Eq2, Ord2, Read2 and Show2

4 years agoswitch liftings of Prelude classes to use explicit dictionaries
Ross Paterson [Wed, 25 Mar 2015 19:23:09 +0000 (19:23 +0000)] 
switch liftings of Prelude classes to use explicit dictionaries

4 years agofix foldr1/foldl1 for Backwards (spotted by Ryan Scott)
Ross Paterson [Tue, 24 Mar 2015 14:41:24 +0000 (14:41 +0000)] 
fix foldr1/foldl1 for Backwards (spotted by Ryan Scott)

4 years agochanges for 0.4.3.0 0_4_3_0
Ross Paterson [Sun, 8 Mar 2015 18:30:05 +0000 (18:30 +0000)] 
changes for 0.4.3.0

4 years agobump version to 0.4.3.0
Ross Paterson [Sun, 8 Mar 2015 18:23:46 +0000 (18:23 +0000)] 
bump version to 0.4.3.0

4 years agosome docs for lifted Prelude classes
Ross Paterson [Sun, 8 Mar 2015 18:21:01 +0000 (18:21 +0000)] 
some docs for lifted Prelude classes

4 years agoadd Eq1, Ord1, Show1 and Read1 instances for Control.Applicative.Const
Ross Paterson [Sun, 8 Mar 2015 17:00:23 +0000 (17:00 +0000)] 
add Eq1, Ord1, Show1 and Read1 instances for Control.Applicative.Const

4 years agoupdate email address
Ross Paterson [Sun, 8 Mar 2015 16:58:15 +0000 (16:58 +0000)] 
update email address

4 years agoupdate repo location
Ross Paterson [Sun, 8 Mar 2015 16:55:42 +0000 (16:55 +0000)] 
update repo location

4 years agotweak documentation of uniformity of liftings
Ross Paterson [Tue, 20 Jan 2015 23:56:22 +0000 (23:56 +0000)] 
tweak documentation of uniformity of liftings

4 years agodocument uniformity conditions for lifting of operations
Ross Paterson [Tue, 20 Jan 2015 18:51:47 +0000 (18:51 +0000)] 
document uniformity conditions for lifting of operations