[Haskell-cafe] Cabal builds file at top level incorrectly
tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Wed Dec 10 19:09:42 UTC 2014
Cabal's behaviour is strange to me. My example cabal file is as follows:
cabal-version: >= 1.2
base >= 4 && < 5
and I have a module `src/Break.hs` that I want it to compile. That would
work fine. But if I have another file at the top-level caled `Break.hs` it
compiles that one instead. It also seems to want it to be an executable.
What's going on?
Full reproduction below. You can see it is trying to compile `Break.hs` not
% git clone https://github.com/tomjaguarpaw/break.git
Cloning into 'break'...
% cd break
% cabal configure && cabal test
Re-configuring with test suites enabled. If this fails, please run configure
Preprocessing library break-0.1...
[1 of 1] Compiling Main ( Break.hs, dist/build/Main.o )
The function `main' is not defined in module `main:Main'
More information about the Haskell-Cafe