[Haskell-cafe] How to preload the module of my own

Alexander Dunlap alexander.dunlap at gmail.com
Fri Sep 4 21:14:50 EDT 2009

On Fri, Sep 4, 2009 at 6:08 PM, zaxis<z_axis at 163.com> wrote:
> I want to preload the module automatically when starting ghci. The module
> located in ~/work directory contains some functions i use everyday.
> Now i use an alias: alias ghci='ghci -i ~/money/Money.hs' which works fine.
> However i feel there maybe are more elegant way.
> thanks!

If the module is part of a package you can put 'import NameOfModule'
in your ~/.ghc/.ghci file. That file contains commands that are run
when ghci starts. I'm not sure if you can load a module that isn't


More information about the Haskell-Cafe mailing list