GHCI and readline package

Sigbjorn Finne sof at galois.com
Mon Nov 1 23:30:57 EST 2004


You can make 'readline' load with GHCi 6.2.2 with
just a little bit of effort -- try the following:

   # any old temporary working directory will do
   bash$ mkdir c:/tmp/hack 
   bash$ cd c:/tmp/hack
   # assuming you've install 6.2.2 in c:/ghc/ghc-6.2.2
   bash$ c:/ghc/ghc-6.2.2/bin/ar x \
      c:/ghc/ghc-6.2.2/lib/libmoldname.a string_old.o
   bash$ c:/ghc/ghc-6.2.2/gcc-lib/ld --whole-archive \
       -r -x -o readline.o c:/ghc/ghc-6.2.2/gcc-lib/libreadline.a \
       string_old.o
   bash$ cp readline.o c:/ghc/ghc-6.2.2/
   # you may now delete the temp dir.

Next, manually edit your c:/ghc/ghc-6.2.2/package.conf,
editing the "readline" package's extra_libraries field to:

    extra_libraries = ["readline", "advapi32"],

Save the changes & you should be ready to go.

--sigbjorn
  
----- Original Message ----- 
From: "Wassell, Mark P (GE Energy)" <mark.wassell at ps.ge.com>
To: <glasgow-haskell-users at haskell.org>
Sent: Monday, November 01, 2004 19:34
Subject: GHCI and readline package


> Hi,
> 
> I'm having a problem running ghci and loading the readline package on
> WindowsXP. 
> 
> C:\Software\haskell\ghc622\bin>ghci -package readline
> ghci -package readline
>   ___         ___ _
>  / _ \ /\  /\/ __(_)
> / /_\// /_/ / /  | |      GHC Interactive, version 6.2.2, for Haskell 98.
> / /_\\/ __  / /___| |      http://www.haskell.org/ghc/
> \____/\/ /_/\____/|_|      Type :? for help.
> 
> Loading package base ... linking ... done.
> Loading package readline ... linking ... 
> C:/Software/haskell/ghc622/HSreadline.o: unknown symbol
> `_rl_redisplay_function'
> ghc.exe: unable to load package `readline'
> 
> 
> I have seen the follow in the user guide:
> 
> "For some reason, Mingw ships with the readline library, but not with the
> readline headers. As a result, GHC (like Hugs) does not use readline for
> interactive input on Windows. You can get a close simulation by using an
> emacs shell buffer!"
> 
> but I assume I need readline as util needs it and util is needed by data
> which is needed by wxcore.
> 
> Cheers
> 
> Mark



More information about the Glasgow-haskell-users mailing list