Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to avoid recompiling in this cabal file?
    primarykey
    data
    text
    <p>I've been working on this Haskell project, and I have a cabal file for it. Now, my project is structured as a library that implements a simple interpreter. I also have a very short Main file which needs to be build into an executable to call the library. What I want to do is:</p> <p>1) compile the library and expose some of the modules</p> <p>2) compile the executable</p> <p>I have a cabal file that works and seems to do this. The problem is that when it compiles the executable it <em>recompiles all the modules which have already been compiled in step (1)</em>. I don't quite understand why it does this - is there any way to stop it, short of creating two separate cabal files?</p> <p>I don't really want to create two separate cabal files, because cabal doesn't seem to like having both the cabal files in the same directory, and I don't really want to set up a separate project directory for the second step, since it basically just amounts to compiling a single file.</p> <pre><code>cabal-version: &gt;= 1.6 build-type: Simple name: HaSC version: 0.2.3 license: OtherLicense category: Language author: Chris B maintainer: Chris B copyright: Chris B 2010 - 2011 synopsis: (HA)skell (S)ound (C)hange applier (HaSC) library description: HaSC implements a little language for applying sound changes to words homepage: http://www.chrisdb.me.uk/redmine/projects/haskell-sound-change stability: Alpha data-files: doc/HaSCDoc.pdf license-file: LICENSE library build-depends: base &gt;= 4.3, containers &gt;= 0.3, parsec &gt;= 3, parallel &gt;= 3.1, deepseq &gt;= 1.1, mtl &gt;= 1.1, transformers &gt;= 0.2, text &gt;= 0.10, text-icu &gt;= 0.6.3, pretty &gt;= 1, directory &gt;= 1.1, filepath &gt;= 1.2 hs-source-dirs: src exposed-modules: HaSC.IO.Disk, HaSC.IO.Memory, HaSC.Exec other-modules: HaSC.AST, HaSC.IO, HaSC.IdentMap, HaSC.Parse, HaSC.Regex, HaSC.Representation, HaSC.Transformations, HaSC.Search, HaSC.State executable HaSC GHC-Options: -rtsopts hs-source-dirs: src main-is: Main.hs </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload