Avi-D-coder / implicit-hie

Auto generate a stack or cabal multi component hie.yaml file
BSD 3-Clause "New" or "Revised" License
201 stars 17 forks source link

implicit-hie doesn't recognize foreign-library sections in cabal #44

Closed cdsmith closed 2 years ago

cdsmith commented 2 years ago

I was attempting to follow the tutorial at https://nokomprendo.gitlab.io/posts/tuto_075/2021-09-12-fr-README.html

HLS is flagging the Binding module with Multi Cradle: no prefixes matched. The module is listed in the other-modules section of a foreign-library section in the cabal file, as follows:

foreign-library fibohs
    type:               native-shared
    cc-options:         -std=c++17
    c-sources:          cbits/binding.cpp
    install-includes:   cbits/binding.hpp
    hs-source-dirs:     ffi
    build-depends:      ffi, base
    other-modules:      Binding

Adding this hie.yaml

cradle:
  cabal:

fixes the problem, which indicates this is a problem with implicit-hie.

Avi-D-coder commented 2 years ago

The fix is published in 0.1.2.7. This should be fixed once HLS picks up the new version.