Skip to content

"Could not find module" for module from dependency #202

@slondr

Description

@slondr

Steps to reproduce:

  1. Create a new project with cabal
  2. Put this in Main.hs:
module Main where

import Brick

ui :: Widget ()
ui = str "Hello, world!"

main :: IO ()
main = simpleMain ui
  1. Change build-depends in project.cabal to this:
    build-depends:    base ^>=4.18.3.0
                    , brick ^>=2.9
  1. Open Main.hs and start lsp.

In this case, cabal build works just fine, as does eglot. But lsp reports the following error on line 3:

Could not find module 'Brick'.

I tried M-x cd to the project root directory, and also to the app/ directory where Main.hs is located, but that didn't seem to affect anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions