Skip to content

Modules not being parsed in HLS #108

Answered by srid
billksun asked this question in Q&A
Jun 25, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Did you update the cabal file? viz.:

diff --git a/haskell-template.cabal b/haskell-template.cabal
index 770a028..3af415f 100644
--- a/haskell-template.cabal
+++ b/haskell-template.cabal
@@ -94,3 +94,5 @@ common shared
 executable haskell-template
   import:  shared
   main-is: Main.hs
+  other-modules:
+    Lib.Lib
diff --git a/src/Main.hs b/src/Main.hs
index fc5ea8d..0295d72 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -1,6 +1,7 @@
 module Main where
 
 import Main.Utf8 qualified as Utf8
+import Lib.Lib
 
 {- |
  Main entry point.
@@ -12,3 +13,4 @@ main = do
   -- For withUtf8, see https://serokell.io/blog/haskell-with-utf8
   Utf8.withUtf8 $ do
     putTextLn "Hello 🌎"
+    print foo

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@billksun
Comment options

@SkyLeite
Comment options

@srid
Comment options

srid Jul 1, 2023
Maintainer

@SkyLeite
Comment options

Answer selected by billksun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #107 on June 25, 2023 19:11.