Proposal for removing transformers dependency

Alexander V Vershilov alexander.vershilov at gmail.com
Thu Jan 22 12:43:16 UTC 2015


As a result of this thread I have created Phab Diff [1]. It contains
required fixes in compiler and ghc-transformers-instance package.

I have tested result on 2 following usecases:

1. I have installed in a sandox transformers-0.3 and ghc-heap-view
   that uses them and ghc-lib. (Doesn't require ghc-tf-instances)
2. I have installed in a sandbox ghc-tf-instaces and ghc-mtl
   that uses ghc-lib and ghc-tf-instances. Some fixes were required
   but they all were pretty straighforward to implement.

[1] https://phabricator.haskell.org/D626

On 21 January 2015 at 18:51, Alexander V Vershilov
<alexander.vershilov at gmail.com> wrote:
> Hello.
>
> I'm coming with a proposal for removing transformers dependency
> from ghc library. The reason for this proposal that it's not possible
> to build consistent environment where a modern libraries (that depend
> on a newer transformers or mtl-2.2) and libraries that use ghc API
> are used together. And often people are tend to use version that is
> bundled with ghc, even if newer are available.
>
> As transformers usage are quite limited in ghc, and it's really relevant
> in ghc-bin, it's possible to duplicate the code, and provide required
> fixes in ghc-bin.cabal. As a result ghc uses it's own MonadIO, MonadControl
> and Strict State, and ghc-bin.cabal (ghc/*) uses ones from transformers.
>
> I have prepared a proof of concept [1], however it doesn't look very clean
> and it's quite possible that will require some generalization, for example
> introduction of the ghc-transformers-instances package that will have
> all required instances.
>
> Should I continue doing this? Are there any things to consider and fix?
>
> [1] https://github.com/qnikst/ghc/compare/wip/remove-tf
> --
> Alexander



-- 
Alexander


More information about the ghc-devs mailing list