<div dir="ltr">The example at <a href="https://www.haskell.org/cabal/users-guide/developing-packages.html#library">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>