Do you get the same error if you give each library a different hs-source-dir ?<div><br></div><div>I don't know the actual reason, but I would guess that maybe something funny is happening with all of the modules being in the same folder.</div><div><br></div><div>Just a guess which is probably wrong! Hope it helps! :)<br><br><div class="gmail_quote"><div dir="ltr">On Thu, 24 May 2018, 08:10 Evan Laforge, <<a href="mailto:qdunkan@gmail.com">qdunkan@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The example at <a href="https://www.haskell.org/cabal/users-guide/developing-packages.html#library" target="_blank">https://www.haskell.org/cabal/users-guide/developing-packages.html#library</a> doesn't seem to work as I expect.  The doc for the library field is out of date, but if you scroll down it mentions "internal libraries".  But depending on the internal library doesn't seem to have any effect, in that cabal still complains I didn't mention Foo.Internal, and doesn't see the build-depends from it.  Am I misinterpreting how the feature is supposed to work?<br><br>This is with Cabal 2.2.0.1 and cabal-install 2.2.0.0, ghc 8.4.1:<br><br>% cat testing.cabal<br>name:           foo<br>version:        1.0<br>license:        BSD3<br>cabal-version:  >= 1.23<br>build-type:     Simple<br><br>library foo-internal<br>    exposed-modules: Foo.Internal<br>    build-depends: base, text<br><br>library<br>    exposed-modules: Foo.Public<br>    build-depends: foo-internal, base<br><br>% cat Foo/Internal.hs<br>module Foo.Internal where<br>import Data.Text<br><br>% cat Foo/Public.hs<br>module Foo.Public where<br>import Foo.Internal<br><br>% cabal build<br>Resolving dependencies...<br>Configuring foo-1.0...<br>Warning: Packages using 'cabal-version: >= 1.10' must specify the<br>'default-language' field for each component (e.g. Haskell98 or Haskell2010).<br>If a component uses different languages in different modules then list the<br>other ones in the 'other-languages' field.<br>Preprocessing library 'foo-internal' for foo-1.0..<br>Building library 'foo-internal' for foo-1.0..<br>[1 of 1] Compiling Foo.Internal     ( Foo/Internal.hs, dist/build/foo-internal/Foo/Internal.o )<br>[1 of 1] Compiling Foo.Internal     ( Foo/Internal.hs, dist/build/foo-internal/Foo/Internal.p_o )<br>Preprocessing library for foo-1.0..<br>Building library for foo-1.0..<br><br><no location info>: warning: [-Wmissing-home-modules]<br>    These modules are needed for compilation but not listed in your .cabal file's other-modules: Foo.Internal<br>[1 of 2] Compiling Foo.Internal     ( Foo/Internal.hs, dist/build/Foo/Internal.o )<br><br>Foo/Internal.hs:2:1: error:<br>    Could not find module ‘Data.Text’<br>    Use -v to see a list of the files searched for.<br>  |<br>2 | import Data.Text<br>  | ^^^^^^^^^^^^^^^^</div>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div></div>