[Haskell-cafe] problem with happy and type identity
cobbe at ccs.neu.edu
Thu Feb 6 11:46:45 UTC 2014
On Wed, Feb 05, 2014 at 08:34:40PM +0100, Erik Hesselink wrote:
> To be able to share code between your library and your tests, you should either
> * Have a separate directory for the library sources and the test
> sources. For example, put Ast.hs and Parser.y in 'src' and put
> 'Hs-source-dirs: src' in the library section. Put RunTests.hs in
> 'tests', and put 'Hs-source-dirs: tests' in the test-suite section.
> This is the preferred way.
> * Alternatively, don't specify 'sample' as a build-depends in the
> test-suite. Note that this will mean that Ast and Parser will get
> compiled twice.
> Right now, cabal somehow mixes types from the files compiled as part
> of the test suite with types imported from the library.
I see -- thanks! I'll give that a shot as soon as I get a chance.
More information about the Haskell-Cafe