Skip to content

Fail on initialisation error & Cannot find module error #217

Closed
@yeomjy

Description

@yeomjy

Hi, I'm using Haskell Language Server extension 0.0.37 on Arch Linux. I'm using ghc-8.8.2 with stack(lts-15.3).
And I installed hie-8.8.2 by Aura(https://github.com/haskell/haskell-ide-engine#installation-on-arch-linux)

First error is:
I used stack new command for making new project directory. And I opened folder at vscode.
Extension successfully worked with app/Main.hs and src/Lib.hs which were made by stack new command.
But Extension doesn't worked with test/Spec.hs and Setup.hs.
Error Message Is:
Fail on initialisation for "/home/junyoung/Haskell/new-project/test/Spec.hs". Could not obtain flags for: "test/Spec.hs". This module was not part of any component we are aware of. Component: ChLibName ChMainLibName with source directory: ["src"] Component: ChExeName "new-project-exe" with source directory: ["app"] To expose a module, refer to: https://docs.haskellstack.org/en/stable/GUIDE/ If you are usingpackage.yamlthen you don't have to manually expose modules. Maybe you didn't set the source directories for your project correctly.
same error messages for Setup.hs.

I think this extension only work with code that makes executable file, How can I use this extension with Setup and test code files?

And the Second Error is:
I made my own module and named it NewModule. Placed It in same director(lib) and imported it in Lib.hs like this.

module Lib
    ( someFunc
    ) where

import NewModule

Then a red underline appeared at "import NewModule"
Error message is:
Could not find module ‘GS’ Use -v (or:set -vin ghci) to see a list of the files searched for
but ghci and stack build worked normally. Why this error message happens?

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