I\'m working on a Haskell project (Happstack server + Blaze HTML/front-end as main libraries) and I want to add a static data directory.
Looks like you can do so with C
Paths_*
modules are only generated by Cabal during builds. If you're running the package using GHCi
or cabal repl
then they simply won't exist and your code will fail with "Cannot find module" errors.
There's a sneaky development mode trick, though: just build your own Paths_*
module and place it in your haskell-source-dir
. During development, GHCi
will load that module and you can adjust its exported symbols to make your development environment fly. During build, Cabal will overwrite your module with its own and take into account the final information needed to build the Paths_*
module.
So in this particular case, just make a file src/Paths_stackbuilders.hs
and provide it a relative path to the datadir
.