Proposal: instance MonadIO Q
Edward Kmett
ekmett at gmail.com
Thu Jul 23 20:35:34 UTC 2015
I'd hesitate to bring in MonadTrans or the rest of transformers into base,
but MonadIO is fully non-controversial and fully Haskell 98.
Lifting up and dropping that *one* module into base is a fairly simple
change.
SPJ made a suggestion of adopting some more of the Data.Functor.* modules
into base a year or so back. We took him up on the idea of Identity, but
punted on the remainder. It may make sense to put together a separate
proposal for the integration of Data.Functor.{Sum, Product, Compose}.
I would only support either proposal if they brought the modules in
unmolested, without bikeshedding.
This would leave the "transformers" in the transformers package.
There are reasons not to like the existing MonadTrans class and reasons as
well not to change it. There is also no need for it in base, nothing in
base is set up in a fashion that it'd even be possible to make use of it to
generalize any existing signatures.
-Edward
On Thu, Jul 23, 2015 at 4:08 PM, David Feuer <david.feuer at gmail.com> wrote:
> Personally I'd think it sensible to push down Control.Monad.Trans.Class,
> Control.Monad.Trans.Reader, and Control.Monad.Trans.State.Strict into base.
> I don't know if any Writer or RWST variants are quite ready for that sort
> of treatment, and ListT obviously isn't.
> On Jul 23, 2015 3:55 PM, "Edward Kmett" <ekmett at gmail.com> wrote:
>
>> Alternately we could lift MonadIO into base.
>>
>> This could be used eventually to lift more computations into MonadIO.
>> Then nobody incurs an extra dependency and we have a first step towards
>> more generic IO operations.
>>
>> -Edward
>>
>> On Thu, Jul 23, 2015 at 3:20 PM, Niklas Hambüchen <mail at nh2.me> wrote:
>>
>>> I'd also like to mention that there's a camp of people who'd like to
>>> have a safe/pure version of TH that cannot do any IO - for changes like
>>> the proposed one we should check whether they'd make that more difficult.
>>>
>>> On 23/07/15 20:09, David Feuer wrote:
>>> > I'm very much in the "Damn the torpedoes; full speed ahead" camp most
>>> of
>>> > the time, but not here. Transformers is a tiny step up from base. Why
>>> > would you make it depend on template haskell rather than the other way
>>> > around?
>>> _______________________________________________
>>> Libraries mailing list
>>> Libraries at haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150723/36e867d4/attachment.html>
More information about the Libraries
mailing list