[Nix-dev] Stumped trying to build Idris with mtl_2_2_1

Shea Levy shea at shealevy.com
Tue Jan 13 14:26:51 CET 2015

Hi Paul,

With the current haskell infrastructure, it is difficult-to-impossible to properly override a core package, and due to the transformers dependency updating mtl amounts to doing just that. However, there has been recent work on haskellng, which is a new haskell infrastructure that, among other things, has facilities for such deep overriding, and is available in master (and partially in release-14.12, though some recent improvements haven’t been backported yet).

It’s still a bit complicated, unfortunately. See [1] for an example that overrides mtl and transformers (it also overrides time, which is responsible for most of the complication of that link; overriding *only* mtl and transformers would be simpler). For details on haskellng, see threads starting at [2], [3], and [4].


[1] https://github.com/NixOS/nixpkgs/blob/b094768e99782162f6f3c2554a0f983d738f0539/pkgs/development/haskell-modules/configuration-ghc-7.8.x.nix#L43-L87
[2] http://lists.science.uu.nl/pipermail/nix-dev/2014-December/015190.html
[3] http://lists.science.uu.nl/pipermail/nix-dev/2015-January/015591.html
[4] http://lists.science.uu.nl/pipermail/nix-dev/2015-January/015608.html

> On Jan 13, 2015, at 7:29 AM, Paul Koerbitz <paul.koerbitz at gmail.com> wrote:
> Dear all,
> I am a bit lost trying to build a current version of Idris (https://github.com/idris-lang/Idris-dev) with my Haskell setup on NixOS.
> The problem is that Idris depends on mtl >= 2.2.1 and I have been unable to get a working setup with mtl_2_2_1.
> I have found a suggestion by jwiegley [1][2] for a build environment that contains mtl_2_2_1, but adapting this in the crudest way possible [3] (I don't really know what I am doing here ...) results in an environment with a lot of broken packages as per 'ghc-pkg check' (and I also can't build Idris in this env).
> I have also found this ticket [4] where Petri states that it is difficult (impossible?) to get mtl_2_2_1 to work with ghc < 7.10.
> Is it possible to get this set up going? (I understand it might be a bad idea to require mtl >= 2.2.1, but I guess the people creating such Haskell projects are able to compile them in some way...)
> Thank you all
> Paul
> [1] https://botbot.me/freenode/nixos/2015-01-06/
> [2] https://gist.github.com/jwiegley/e054c6ea681d1739873f/
> [3] https://gist.github.com/paulkoerbitz/42ad97c6985b92092391
> [4] https://github.com/NixOS/nixpkgs/issues/5649
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev

More information about the nix-dev mailing list