[Haskell-cafe] Cabal builds file at top level incorrectly
Roman Cheplyaka
roma at ro-che.info
Wed Dec 10 20:08:16 UTC 2014
This appears to be a bug in ghc, not cabal.
Cabal correctly calls ghc with -i, which should empty the search path.
Apparently, that -i is ignored.
Please report this to ghc trac. (Feel free to copy this email as an
explanation.)
Roman
On 10/12/14 21:09, Tom Ellis wrote:
> Cabal's behaviour is strange to me. My example cabal file is as follows:
>
> name: break
> version: 0.1
> cabal-version: >= 1.2
> build-type: Simple
>
> library
> hs-source-dirs: src
> build-depends:
> base >= 4 && < 5
> exposed-modules: Break
>
> 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
> `src/Break.hs`.
>
>
> % git clone https://github.com/tomjaguarpaw/break.git
> Cloning into 'break'...
> [...]
> % cd break
> % cabal configure && cabal test
> Resolving dependencies...
> Configuring break-0.1...
> Re-configuring with test suites enabled. If this fails, please run configure
> manually.
> Resolving dependencies...
> Configuring break-0.1...
> Building break-0.1...
> Preprocessing library break-0.1...
> [1 of 1] Compiling Main ( Break.hs, dist/build/Main.o )
>
> Break.hs:1:1:
> The function `main' is not defined in module `main:Main'
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141210/b99ac4f5/attachment.sig>
More information about the Haskell-Cafe
mailing list