
On Thu, Nov 20, 2008 at 7:16 AM, Ian Lynagh
Although another option would be to make GHCi a separate (GPL) frontend to the (BSD) GHC API. The only downside is that (with static linking) we have another large binary. Another upside is that other GHC API users don't get an editline dependency.
I've actually been experimenting with something similar: darcs get http://code.haskell.org/~judah/ghci-haskeline/ If you have ghc-6.10.1, 'cabal install'ing inside that repo will give you a version of ghci which uses Haskeline as its backend. Basically, I copied 4 modules from the GHC source tree (GhciMonad, InteractiveUI, GhciTags and Main) and modifed them to use Haskeline; the rest of GHC is obtained through the API. Current benefits over the readline/editline versions: - Works on Windows - Tab completion of quoted filenames within Haskell expressions - Tab completion of Unicode identifiers (trac #2058) - Internally, eliminates the need for some GLOBAL_VARs The only real regression I'm aware of is that Haskeline doesn't yet provide a way to "bind" custom key commands as in an inputrc or editrc file. The recent discussion has indicated how important that feature is for some users, so it's next on my TODO list. -Judah