[darcs-users] Haskeline 0.4 support?

Judah Jacobson judah.jacobson at gmail.com
Sun Dec 7 06:50:07 UTC 2008


On Sat, Dec 6, 2008 at 5:43 PM, Trent W. Buck <trentbuck at gmail.com> wrote:
> I tried to test Haskeline support yesterday.  Since "cabal install
> haskeline" gave me 0.4.something, I tried to use that by loosening the
> version constraint in darcs.cabal.
>
> I used cabal configure -f'haskeline <other flags>', so IIUC it did link
> against haskeline.  Certainly cabal configure complained about not
> having haskeline 0.3 until I loosened the constraint.  Darcs built
> successfully (with "cabal build").

Currently darcs requires haskeline-0.3, as you've mentioned.  So you can either:
 - Use "cabal install -fhaskeline" to build darcs, which will
automatically download and install haskeline-0.3.2
 - First run "cabal install haskeline-0.3.2" to manually install the
necessary version of the library.


> Now, maybe I've misunderstood what haskeline is supposed to provide.  I
> expect it to provide a line editor similar to what the C libraries
> libreadline and libedit provide in e.g. bash, or what the rlwrap program
> provides for arbitrary stdio programs.

Yes, that's correct.

> For example, I expect typing Control+B or the left arrow to move the
> cursor back one character when I'm at the "What is the patch name?"
> prompt.  But it just inserts the control/escape codes on the end of the
> line -- the same behaviour as I get without haskeline.

Are you sure you built it with haskeline support?  The current version
of darcs on hackage won't build against haskeline by default, hence
the need to pass -fhaskeline to cabal.  Make sure you've downloaded
haskeline-0.3.2, then try building darcs again.


As a side note, I'm pretty sure that haskeline-0.4 would actually be
compatible with darcs; I'll send a patch to update the .cabal file
once I've done some more testing to confirm that.

-Judah


More information about the darcs-users mailing list