using ghc-paths and rlwrap with GHCi - two additions to the GHCi HaskellWiki

Claus Reinke claus.reinke at
Sun Jul 6 18:02:12 EDT 2008

1. If you ever find yourself inside a GHCi session, wondering what packages
are installed for this very GHCi, whereever those OpenGL modules were
located in the module hierarchy, what package that module belongs to,
or where the library docs are, well, anything that means you need to find
the *matching ghc-pkg*, or the *matching users_guide* for your GHCi
session, you can exploit Simon's new ghc-paths package (also for GHC
API clients who need to find that libdir for their session):

This wiki entry suggests some command :defs, using ghc-paths to call
the right ghc-pkg, or open the right users_guide from within a GHCi

2. If you're using GHCi on windows, you're probably missing out
on its commandline completion support - rlwrap can get you
at least some of that (might also be interesting for other Haskell
apps that can't or won't use readline/editline for user input).

This wiki entry shows basic usage, and how to extract lists of
GHC options and package modules, for completion purposes:

Enjoy (and don't forget to add your own tips&tricks to that wiki page!-),

More information about the Glasgow-haskell-users mailing list