Building fmhs fails due to missing dependencies in the Formality.cabal file.
To Reproduce
Execute the commands:
git clone https://github.com/Kindelia/Kind
cd Kind/bin/hs
cabal build
cabal install
The output:
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
- Formality-0.1.0.0 (lib) (first run)
- Formality-0.1.0.0 (exe:fmhs) (first run)
Preprocessing executable 'fmhs' for Formality-0.1.0.0..
Preprocessing library for Formality-0.1.0.0..
Building executable 'fmhs' for Formality-0.1.0.0..
Building library for Formality-0.1.0.0..
<no location info>: warning: [-Wmissing-home-modules]
These modules are needed for compilation but not listed in your .cabal file's other-modules:
FormalityInternal
[1 of 2] Compiling FormalityInternal ( src/FormalityInternal.hs, /home/thedward/tmp/Kind/bin/hs/dist-newstyle/build/x86_64-linux/ghc-8.10.7/Formality-0.1.0.0/x/fmhs/build/fmhs/fmhs-tmp/FormalityInternal.o )
[1 of 2] Compiling FormalityInternal ( src/FormalityInternal.hs, /home/thedward/tmp/Kind/bin/hs/dist-newstyle/build/x86_64-linux/ghc-8.10.7/Formality-0.1.0.0/build/FormalityInternal.o, /home/thedward/tmp/Kind/bin/hs/dist-newstyle/build/x86_64-linux/ghc-8.10.7/Formality-0.1.0.0/build/FormalityInternal.dyn_o )
src/FormalityInternal.hs:8:1: error:
Could not load module ‘System.Directory’
It is a member of the hidden package ‘directory-1.3.6.0’.
Perhaps you need to add ‘directory’ to the build-depends in your .cabal file.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
8 | import System.Directory
| ^^^^^^^^^^^^^^^^^^^^^^^
src/FormalityInternal.hs:9:1: error:
Could not load module ‘System.FilePath.Posix’
It is a member of the hidden package ‘filepath-1.4.2.1’.
Perhaps you need to add ‘filepath’ to the build-depends in your .cabal file.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
9 | import System.FilePath.Posix (takeDirectory)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/FormalityInternal.hs:8:1: error:
Could not load module ‘System.Directory’
It is a member of the hidden package ‘directory-1.3.6.0’.
Perhaps you need to add ‘directory’ to the build-depends in your .cabal file.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
8 | import System.Directory
| ^^^^^^^^^^^^^^^^^^^^^^^
src/FormalityInternal.hs:9:1: error:
Could not load module ‘System.FilePath.Posix’
It is a member of the hidden package ‘filepath-1.4.2.1’.
Perhaps you need to add ‘filepath’ to the build-depends in your .cabal file.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
9 | import System.FilePath.Posix (takeDirectory)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build Formality-0.1.0.0.
Failed to build exe:fmhs from Formality-0.1.0.0.
Adding filepath and directory to the dependencies in the cabal file allows it to compile without errors.
Description
Building fmhs fails due to missing dependencies in the
Formality.cabal
file.To Reproduce
Execute the commands:
The output:
Adding
filepath
anddirectory
to the dependencies in the cabal file allows it to compile without errors.Expected behavior
I would expect it to compile without errors.
Environment
Additional context
Add any other context about the problem here.