Intero : Failed to load interface for Lib

Ford O.

I am trying to setup my Haskero (Visual Studio Code extension that uses Intero) for my Haskell project, yet I get the following error :

app\Main.hs:3:1: error:
   Failed to load interface for `Lib'
   Use -v to see a list of the files searched for.

Steps to reproduce:

stack new project
cd project
stack build intero
stack exec intero
> :l app/Main.hs

app/Main.hs :

module Main where

import Lib

main :: IO ()
main = someFunc

src/Lib.hs :

module Lib
   ( someFunc
   ) where

someFunc :: IO ()
someFunc = putStrLn "someFunc"
K. A. Buhr

I don't have experience with Haskero but can duplicate the problem with a plain old Intero installation on a Linux machine.

The issue is that you're invoking the Intero backend via stack exec instead of stack ghci. You would observe the same problem if you tried using stack exec ghci instead of stack ghci to invoke a usual GHC interactive session (see the documentation for stack ghci for more information).

Instead of stack exec intero, try:

stack ghci --with-ghc intero --no-build --no-load

and it should work okay.

(Note that stack exec intero actually works okay if you stack build your project first, but the interactive session is still supposed to be invoked via stack ghci.)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Spring: Failed to load ApplicationContext

From Dev

Failed to declare MonadPlus interface

From

failed to load ad : 3

From

Interface Builder - Failed to load designables from path (null)

From

Failed to load JavaHL Library

From Java

Failed to load ApplicationContext (with annotation)

From Dev

Imgur API Failed to load

From Dev

NUnit failed to load DLL

From Dev

Failed to locate a binder for interface

From Dev

SpecFlow project load failed

From Dev

Failed to load Xamarin Forms project with .NET Standard 2.0 Lib in Rider

From Dev

Haskell Failed to load interface for module

From Dev

stack build fails with "Failed to load interface for `Main' no unit id matching `main' was found"

From Dev

Error: package or namespace load failed for ‘tidyverse’ in library.dynam(lib, package, package.lib): shared object ‘rlang.so’ not found

From Dev

Vuetify Image load failed

From Dev

Failed to load .js resource

From Dev

Gnome graphical interface failed to load

From Dev

Haskell "Failed to load interface" after changing directory

From Dev

'Failed to load interface' error when loading compiled modules in ghci

From Dev

Failed to load SASS plugin

From Dev

Xcodebuild: Failed to load Addressbook

From Dev

Failed to load external entity

From Dev

Failed to load scss with webpack

From Dev

How to load a lib with composer?

From Dev

CSS load failed in REACT

From Dev

Failed to load interface for ‘System’

From Dev

load shared lib in GDB session

From Dev

Failed to load ApplicationContext exception

From Dev

Failed to add interface to sandbox