moocfi/haskell-mooc

Set4a.hs gives import errors when :loading into GHCI

Closed this issue · 1 comments

Sose commented

Set4a.hs imports Data.Map and Data.Array which need packages containers and array to be installed. I don't know if the project knows to install them but for some reason they're "hidden" for stack ghci or what exactly is happening but I think there should be atleast a comment in the Set4a.hs file about the potential errors and how to fix them...

Fixing it was easy enough by reading the error messages but my editor integration is still broken for that file and I don't know how I would tell my editor's plugin or Haskell Language Server to "see" those "hidden packages".

Included is what happens on my system after cloning the repository and trying to :load the Set4a.hs file into GHCI.

Sorry if it's confusing, new to Haskell and the whole ecosystem.

error.txt

Hey, thanks for the report! The packages are indeed missing from tests.cabal. For some reason stack ghci Set4a.hs works even though it shouldn't but stack ghci and :load Set4a.hs fails.

I'll have a fix in a second.