From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: Re: heads-up: Haskell updates Date: Sat, 17 Feb 2018 11:04:41 -0500 Message-ID: <87po53mwkm.fsf@ngyro.com> References: <87r2ppjbst.fsf@elephly.net> <873723pfya.fsf@netris.org> <871shn8jm5.fsf@elephly.net> <87zi4b744f.fsf@elephly.net> <20180214234721.4e9fe198@scratchpost.org> <87a7waodaa.fsf@netris.org> <20180215120404.0a96b628@scratchpost.org> <87fu626yvj.fsf@elephly.net> <20180215180340.52db6ded@scratchpost.org> <20180216162642.106e9c7c@scratchpost.org> <87po54vqug.fsf@fastmail.com> <87y3js6da0.fsf@elephly.net> <87o9knvmra.fsf@gmail.com> <87tvuf6c8s.fsf@elephly.net> <87fu5zvkqc.fsf@gmail.com> <87r2pj6a9j.fsf@elephly.net> <87371zg2ij.fsf@ngyro.com> <87o9kn65l3.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1en4yl-0007Ph-QF for guix-devel@gnu.org; Sat, 17 Feb 2018 11:04:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1en4yh-0000RH-Qf for guix-devel@gnu.org; Sat, 17 Feb 2018 11:04:47 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:47495) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1en4yh-0000Qa-IE for guix-devel@gnu.org; Sat, 17 Feb 2018 11:04:43 -0500 In-Reply-To: <87o9kn65l3.fsf@elephly.net> (Ricardo Wurmus's message of "Sat, 17 Feb 2018 15:42:00 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel Ricardo Wurmus writes: >> Based on your earlier suggestion, I played around with removing all the >> packages that GHC provides. I made the same change to ghc-mtl on >> core-updates, and it allows me to build ghc-resourcet. > [=E2=80=A6] >> Is this too drastic? I could rebase on top of your ghc-mtl changes and >> submit a patch if you think its OK. > > Not too drastic. This is exactly what I had hoped for :) > > Thank you for making the effort. A patch on top of latest core-updates > / master would be very welcome. I sent the patch. It=E2=80=99s bug #30501. (The most complicated part was= the changelog; I hope it=E2=80=99s OK!) > Now, how do we prevent this in the future? Can we modify =E2=80=9Cguix l= int=E2=80=9D to > warn about these cases? Can we also change the hackage importer to > keep these packages out of the inputs of generated package definitions? I can think of two approaches. We could follow the style of Hackage and force everything to reference the base libraries. To make this work, we would have to make builds fail if they don=E2=80=99t reference a base library that they need. Maybe there=E2=80=99s a way to hide the base libraries in the Haskell build syste= m, and use packages to expose them. The major downside to this is adding a =E2=80=9Cghc-base=E2=80=9D input to every Haskell package (and =E2=80=9Cghc= -binary=E2=80=9D to a bunch, etc.). The upside is that it is more intuitive: the inputs look more like Hackage, and you could try new versions of the base libraries using standard Guix tools like: $ guix package -i ghc-pandoc \ --with-input=3Dghc-transformers=3Dghc-transformers-new (This would update all the dependencies, too, leaving the GHC-provided library hidden and only exposing the new library, thus avoiding all the conflicting version problems.) We would have to make sure that =E2=80=9Cguix package -i ghc=E2=80=9D still= provides the libraries, though, to save people a lot of confusion. The second approach would be to leave everything implicit, and add notes everywhere not to break things (in the docs, the linter, and the importer). I guess we would have to be careful when updating GHC in case it adopts new base libraries. The appeal of this approach is that it is basically what we just did, so it=E2=80=99s done modulo the changes t= o the linter and importer. Personally, I prefer the first approach even though it=E2=80=99s a bit of a radical departure. It feels like it fits more both with Guix and Haskell. I also think that most Haskell people coming to Guix would just understand it without any extra explanation. Updating every single Haskell package is a bit daunting :S. It=E2=80=99s something I=E2=80=99m w= illing to look at, though. What do you think? I=E2=80=99m happy to look at the linter and importer, t= oo. I would like to package =E2=80=9Cgit-annex=E2=80=9D, so making the Haskell = stuff a little nicer is only a minor detour towards that goal (last I checked, I will have to import a lot of packages yet). -- Tim