You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cabal new-build all
Build profile: -w ghc-8.6.3 -O1
In order, the following will be built (use -v for more details):
- foo-1 (lib) (first run)
Configuring library for foo-1..
Preprocessing library for foo-1..
Building library for foo-1..
[1 of 1] Compiling Main ( Foo.hs, /tmp/foo/dist-newstyle/build/x86_64-linux/ghc-8.6.3/foo-1/build/Main.o )
/usr/bin/ar: /tmp/foo/dist-newstyle/build/x86_64-linux/ghc-8.6.3/foo-1/build/Foo.o: No such file or directory
$ cat foo.cabal
cabal-version: 2.4
name: foo
version: 1
library
default-language: Haskell2010
exposed-modules: Foo
build-depends: base
$ cat Foo.hs
main = return ()
$ cabal --version
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library
The user's problem here is that Foo.hs needs a module Foo where header, but it's not at all obvious how to figure that out from the ar error.
The text was updated successfully, but these errors were encountered:
The error comes from GHC. I don't think there's anything we can easily do, otherwise than moving out from using `ghc --make`, i.e. don't use GHC's built-in "build system features" (there's issue about that, cannot lookup on mobile).
`-v3` output would help. If cabal gives modules (not filepaths) than GHC does something silly (as it's not Foo module in Foo.hs)
Similar problem is having library and test-suite sources in a same directory. Currently it's not a good idea; but it doesn't need to be. (Currently library dependency from test-suite won't be used, as GHC will *discover* library modules as sources)
On 3 Feb 2019, at 11.00, quasicomputational ***@***.***> wrote:
$ cabal new-build all
Build profile: -w ghc-8.6.3 -O1
In order, the following will be built (use -v for more details):
- foo-1 (lib) (first run)
Configuring library for foo-1..
Preprocessing library for foo-1..
Building library for foo-1..
[1 of 1] Compiling Main ( Foo.hs, /tmp/foo/dist-newstyle/build/x86_64-linux/ghc-8.6.3/foo-1/build/Main.o )
/usr/bin/ar: /tmp/foo/dist-newstyle/build/x86_64-linux/ghc-8.6.3/foo-1/build/Foo.o: No such file or directory
$ cat foo.cabal
cabal-version: 2.4
name: foo
version: 1
library
default-language: Haskell2010
exposed-modules: Foo
build-depends: base
$ cat Foo.hs
main = return ()
$ cabal --version
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library
The user's problem here is that Foo.hs needs a module Foo where header, but it's not at all obvious how to figure that out from the ar error.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
The user's problem here is that
Foo.hs
needs amodule Foo where
header, but it's not at all obvious how to figure that out from thear
error.The text was updated successfully, but these errors were encountered: