Haskell Failed to load interface for module

Bercovici Adrian

Hello i am trying to use a module inside another module but it seems it just won't work.I tried updating the cabal file,stack,i reinstalled the platform,ghc and everything and it just won't let it import modules.I tried adding in the cabal file both other-modules and home-modules section ..to no effect.What could be the problem?

Modules:

module Test where


    test::IO()
    test=do
        elem<-getLine
        print elem


module Main where

import Test

main :: IO ()
main = do
  putStrLn "hello world"

Cabal-build renders this error:

$ cabal build

Resolving dependencies...
Configuring console-0.1.0.0...
Warning: To use the 'default-language' field the package needs to specify at
least 'cabal-version: >= 1.10'.
Preprocessing executable 'console' for console-0.1.0.0..
Building executable 'console' for console-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: Test

<no location info>: warning: [-Wmissing-home-modules]
    These modules are needed for compilation but not listed in your .cabal file's other-modules: Test

When i build with Stack i get this error:

C:\<path>\Main.hs:4:1: error:
    Failed to load interface for `Test'
    Use -v to see a list of the files searched for.
Failed, modules loaded: none.
H>>= :module + *Main

Cabal file:

 name:                console
version:             0.1.0.0
-- synopsis:
-- description:
homepage:            https://github.com/githubuser/console#readme
license:             BSD3
license-file:        LICENSE
author:              Bercovici Adrian Simon
maintainer:          [email protected]
copyright:           2018 Bercovici Adrian Simon
category:            Web
build-type:          Simple
cabal-version:       >=1.2
extra-source-files:  README.md


Executable console
  hs-source-dirs:      src
  main-is:             Main.hs
  default-language:    Haskell2010

  build-depends:       base                  >= 4.7    && < 5
  other-modules:       Test
Daniel Wagner

The other-modules: directive must go inside the Executable console stanza.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Haskell "Failed to load interface" after changing directory

From Dev

Failed to load interface for ‘System’

From Dev

Electron Failed to load Module

From Dev

Failed to load kafka module

From Dev

Intero : Failed to load interface for Lib

From Dev

Gnome graphical interface failed to load

From Dev

Failed to load module in Angular JS

From Dev

Failed to load module "canberra-gtk-module"

From Java

letsencrypt failed with ImportError: No module named interface

From Dev

Haskell Criterion: Could not load module, hidden package

From Dev

The Module "aspnetcorev2.dll" failed to load

From Dev

Wildfly Failed to Load Module for Oracle Driver

From

Android Firebase DynamiteModule: Failed to load module descriptor

From Dev

Failed to build module 'Razorpay' from its module interface

From Dev

Gtk-Message: Failed to load module "pantheon-filechooser-module"

From Dev

Gtk-Message: Failed to load module “pantheon-filechooser-module”

From Dev

How to fix error: Failed to load module "canberra-gtk-module"

From Dev

What is a "Failed to load module "module-ladspa-sink"" error?

From Dev

Gtk Failed to load module "pantheon-filechooser-module"

From

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

From Dev

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

From Dev

Problems with importing Tensoflow in Jupyter. DLL load failed. Specific module failed to load

From Dev

ImportError: DLL load failed: The specified module could not be found for numpy

From Dev

pyodbc ImportError: DLL load failed: The specified module could > not be found

From Dev

Python: ImportError: DLL load failed: The specified module could not be found

From Dev

py2exe failed to load specified module

From Dev

"Failed to load module" error for Firebird datasource on WildFly 8.1.0.Final

From Java

ImportError: DLL load failed: The specified module could not be found

From Java

ImportError: DLL load failed: The specified module could not be found

Related Related

  1. 1

    Haskell "Failed to load interface" after changing directory

  2. 2

    Failed to load interface for ‘System’

  3. 3

    Electron Failed to load Module

  4. 4

    Failed to load kafka module

  5. 5

    Intero : Failed to load interface for Lib

  6. 6

    Gnome graphical interface failed to load

  7. 7

    Failed to load module in Angular JS

  8. 8

    Failed to load module "canberra-gtk-module"

  9. 9

    letsencrypt failed with ImportError: No module named interface

  10. 10

    Haskell Criterion: Could not load module, hidden package

  11. 11

    The Module "aspnetcorev2.dll" failed to load

  12. 12

    Wildfly Failed to Load Module for Oracle Driver

  13. 13

    Android Firebase DynamiteModule: Failed to load module descriptor

  14. 14

    Failed to build module 'Razorpay' from its module interface

  15. 15

    Gtk-Message: Failed to load module "pantheon-filechooser-module"

  16. 16

    Gtk-Message: Failed to load module “pantheon-filechooser-module”

  17. 17

    How to fix error: Failed to load module "canberra-gtk-module"

  18. 18

    What is a "Failed to load module "module-ladspa-sink"" error?

  19. 19

    Gtk Failed to load module "pantheon-filechooser-module"

  20. 20

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

  21. 21

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

  22. 22

    Problems with importing Tensoflow in Jupyter. DLL load failed. Specific module failed to load

  23. 23

    ImportError: DLL load failed: The specified module could not be found for numpy

  24. 24

    pyodbc ImportError: DLL load failed: The specified module could > not be found

  25. 25

    Python: ImportError: DLL load failed: The specified module could not be found

  26. 26

    py2exe failed to load specified module

  27. 27

    "Failed to load module" error for Firebird datasource on WildFly 8.1.0.Final

  28. 28

    ImportError: DLL load failed: The specified module could not be found

  29. 29

    ImportError: DLL load failed: The specified module could not be found

HotTag

Archive