HigherOrderCO / Kind

A modern proof language
https://higherorderco.com
MIT License
3.58k stars 142 forks source link

Building fmhs Fails Due to Missing Dependencies #325

Closed thedward closed 2 years ago

thedward commented 2 years ago

Description

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.

Expected behavior

I would expect it to compile without errors.

Environment

OS Debian GNU/Linux 11
Kind Version 1.0.112 (master)
GHC Version 8.10.7
Cabal Version 3.6.2.0

Additional context

Add any other context about the problem here.

rigille commented 2 years ago

Unfortunately we are only mantaining the javascript release, so haskell won't work. But you can use the javascript version to try Kind.