[Haskell-cafe] How to use cabal's data-files feature and run in-place?

Henning Thielemann schlepptop at henning-thielemann.de
Sun Apr 24 13:50:42 CEST 2011


balodja schrieb:

> For such purposes I use separate directory for Paths_pkg.hs and don't
> notice it in pkg.cabal. For example, imagine "src" directory with
> source files (appropriately mentioned in pkg.cabal with "hs-source-dirs:
> src") and additional "plugs" directory with "Paths_pkg.hs" (that is not
> mentioned in pkg.cabal). In such case cabal builds project with
> autogenerated Paths_pkg.hs and ghci also can be launched in "src"
> directory with "ghci Main.hs -i../plugs".

or you run from your package directory with

pkg$ ghci -i:src:plugs Main

This only works, if the module Main has filename Main.hs

Otherwise start with

pkg$ ghci -i:src:plugs src/Main.hs



More information about the Haskell-Cafe mailing list