readline fun

Simon Marlow simonmar at microsoft.com
Mon Feb 7 06:57:58 EST 2005


On 02 February 2005 15:51, Ian Lynagh wrote:

> The Debian ghc6 package curently has both a build-dependency and a
> normal dependency on libreadline4-dev. The former is so the readline
> library (and ghci) can be built, and the latter so compiling programs
> with the readline package behaves correctly.
> 
> Now I want to move over to libreadline5-dev instead. Clearly, to build
> the new ghc6, I need the old ghc6 installed, and thus need
> libreadline4-dev installed (as it's a dependency). However,
> libreadline4-dev and libreadline5-dev can't be installed
> simultaneously. 
> 
> I believe this isn't a /real/ problem because the readline package of
> the old GHC isn't actually needed to compile a new GHC, so
> libreadline4-dev isn't actually needed. Thus I can solve this problem
> by doing a build by hand on each arch. However, it would make my life
> a lot easier if things weren't so entangled in the first place.

I bet the old GHC will work fine with the new readline.  Can't you solve it that way?  (apologies if I'm just being naïve... I've never used a Debian system).

> While I could just split the readline package off into a separate
> ghc6-readline package for Debian, I fear this may cause confusion for
> users, and it would mean satisfying cabal package deps was not
> necessarily sufficient for Debian systems. So what would be really
> useful for me is if the split were done by ghc itself, in much the
> same way as how the opengl libraries can be split off. Then, in
> particular, cabal packages using readline would have to explicit
> state it rather than assuming it'll be there by default.

Not sure what you're asking for here.  The OpenGL libraries can't easily be split off.  You want us to ship the readline package separately, say as a Cabal package?  That's a possibility, but we like to keep the GHC sources as self-contained as possible, and adding another dependency just makes it harder to build GHC.  Sure, readline would be optional, but mostly you want it ("why doesn't up-arrow work in the GHCi I just built?").

Ideally, we would have a home-grown readline replacement (System.Console.SimpleLineEditor doesn't count: it depends on your terminal using ANSI escape sequences).

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list