[Nix-dev] haskell: overriding mtl/any builtin

Benno Fünfstück benno.fuenfstueck at gmail.com
Tue Sep 9 14:12:27 CEST 2014


There is no problem overriding `mtl` with a newer version than the one GHC
provides assuming we also override all packages depending on mtl. I think
this is possible as long as the package using mtl doesn't depend on the GHC
api (ghc package), because we cannot override the GHC api package and it
depends on mtl.

--
Benno

2014-09-08 17:50 GMT+02:00 Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk>:

> On 09/08/2014 07:36 AM, Peter Simons wrote:
> > Hi Mateusz,
> >
> >  > Notably if I specify mtl = mtl_2_2_1; then it complains that it needs
> >  > transformers == 0.4 but there seems to be no clues in nixpkgs as to
> how
> >  > to achieve this. Currently mtl = 2.2.1 for HEAD but I know it should
> >  > work with 7.8.3
> >
> > transformers is a core library in GHC 7.8.3. We cannot override that
> > package, because it's shipped with the compiler and other core libraries
> > are linked against that version.
> >
> > Best regards,
> > Peter
> >
> > _______________________________________________
> > nix-dev mailing list
> > nix-dev at lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
> >
>
> Right, yes, it is, yet somehow there are packages around on Hackage
> which do depend on mtl-2.2.1 and by proxy on transformers-0.4, which do
> compile with GHC 7.8.3. This must be somehow achieved one way or another
> and currently with nix(pkgs) we can not accommodate for those packages.
> Recent release of JuicyPixels is a good example, we had to ask upstream
> to relax the bound a bit so that we could use it but just relaxing the
> bound is not always possible. I expect more and more packages to start
> using the new mtl over time.
>
> I found myself yesterday in need of hacking a bit on a project which
> happened to actually need mtl-2.2.1 and I just could not do it with
> 7.8.3 whereas that's exactly what the original developer was using. My
> hack there was to comment out the 2.2.1 imports and manually stick
> undefined everywhere but that's obviously not acceptable for any actual
> work.
>
> The only other way I could think of would be to use the (outdated) GHC
> ‘HEAD’ version from nixpkgs which would not help me because it was to
> try and chase down a bug appearing with 7.8.3.
>
> --
> Mateusz K.
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140909/623092ac/attachment.html 


More information about the nix-dev mailing list