Changes between Version 12 and Version 13 of Proposals/transformers
 Timestamp:
 09/16/10 09:05:31 (6 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Proposals/transformers
v12 v13 10 10 == Rationale == 11 11 12 Monad transformers are widely used, but the MTL i mplementation is tied to functional dependencies, whose future is in doubt. Many people want to try out versions based on type functions, or without using advanced type classes at all, but their interfaces will then be incompatible with libraries using mtl.12 Monad transformers are widely used, but the MTL interface is tied to functional dependencies, whose future is in doubt. Many people want to try out interfaces based on type functions, or without using experimental type class features, but their interfaces will then be incompatible with libraries using mtl. 13 13 14 The idea is to factor out the monad transformers as a Haskell 98 package, which can be used by itself or with type classes based on either functional dependencies or type functions. Interfaces referring to the monad transformers would be compatible across the different libraries. 14 The idea is to factor out the monad transformers as the Haskell 98 package. The objectives for this package are: 15 1. that it be as useful as possible by itself, so that it can replace many uses of mtl. 16 2. that it serve as a base for other packages adding type classes based on either functional dependencies (e.g. mtl) or type functions, with interfaces referring to the monad transformers being compatible across the different libraries. 15 17 16 The transformers and monadsfdpackages have been in use for over 18 months, and are used by 112 and 23 packages respectively. The split structure has been shown to be viable, but its existence in parallel with mtl has meant extra effort for authors of client packages. It is time to complete the transition.18 The [http://hackage.haskell.org/package/transformers transformers] and [http://hackage.haskell.org/package/monadsfd monadsfd] packages have been in use for over 18 months, and are used by 112 and 23 packages respectively. The split structure has been shown to be viable, but its existence in parallel with mtl has meant extra effort for authors of client packages. It is time to complete the transition. 17 19 18 20 == Structure == … … 20 22 The current mtl is to be split in two: 21 23 22 * [http://hackage.haskell.org/package/transformers transformers] is a Haskell 98 package containing the identity monad (Data.Functor.Identity), transformer classes (Control.Monad.Trans.Class and Control.Monad.IO.Class) and concrete monad transformers with code to lift operators (Control.Monad.Trans.*). 24 * [http://hackage.haskell.org/package/transformers transformers] is a Haskell 98 package containing 25 * base functors (Data.Functor.Constant and Data.Functor.Identity), 26 * operations on functors (Data.Functor.Compose and Data.Functor.Product), 27 * transformer classes (Control.Monad.Trans.Class and Control.Monad.IO.Class) and 28 * concrete monad transformers with code to lift operators (Control.Monad.Trans.*). 23 29 The package can be used on its own (see the [http://hackage.haskell.org/packages/archive/transformers/latest/doc/html/ControlMonadTransClass.html Control.Monad.Trans.Class documentation] for examples), or with packages adding type classes. 24 30 25 * mtl2 (the current [http://hackage.haskell.org/package/monadsfd monadsfd]) depends on transformers and adds type classes using functional dependencies. Usage is very close to mtl1, except for the differences listed below.31 * mtl2 (the current [http://hackage.haskell.org/package/monadsfd monadsfd]) depends on transformers and adds type classes using functional dependencies. It has the same modules as mtl1 and usage is very close, except for the differences listed below. 26 32 27 33 == Incompatibilities == … … 92 98 * 1 that defined an overlapping Error instance 93 99 * 53 failed because they depended on one of the other failures 100 The attached test report lists the packages involved. 94 101 95 102 == Other issues ==