moocfi/haskell-mooc

Set14b.hs import error when :loading in GHCI

Sose opened this issue · 1 comments

Sose commented

Similar to here, #14

Easily avoided by using stack ghci Set14b.hs instead but should probably be fixed. Missing package from the cabal file seems to be "http-types"

Configuring GHCi with the following packages: tests
GHCi, version 8.10.4: https://www.haskell.org/ghc/  :? for help
macro 'doc' overwrites builtin command.  Use ':def!' to overwrite.
Loaded GHCi configuration from /home/sose/.ghci
Loaded GHCi configuration from /tmp/haskell-stack-ghci/2a3bbd58/ghci-script
λ> :l Set14b
[1 of 2] Compiling Mooc.Todo        ( /home/sose/koodi/haskell/mooc2/haskell-mooc/exercises/Mooc/Todo.hs, interpreted )
[2 of 2] Compiling Set14b           ( Set14b.hs, interpreted )

Set14b.hs:26:1: error:
    Could not load module ‘Network.HTTP.Types’
    It is a member of the hidden package ‘http-types-0.12.3’.
    You can run ‘:set -package http-types’ to expose it.
    (Note: this unloads all the modules in the current scope.)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
26 | import Network.HTTP.Types (status200)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Failed, one module loaded.
λ> 
Leaving GHCi.
~/.../haskell-mooc/exercises >>> stack ghci Set14b.hs                                         ±[●●][master]

Warning: Couldn't find a component for file target /home/sose/koodi/haskell/mooc2/haskell-mooc/exercises/Set14b.hs. This means that the correct ghc options might not be used.
         Attempting to load the file anyway.
Configuring GHCi with the following packages: 
GHCi, version 8.10.4: https://www.haskell.org/ghc/  :? for help
macro 'doc' overwrites builtin command.  Use ':def!' to overwrite.
Loaded GHCi configuration from /home/sose/.ghci
[1 of 2] Compiling Mooc.Todo        ( Mooc/Todo.hs, interpreted )
[2 of 2] Compiling Set14b           ( /home/sose/koodi/haskell/mooc2/haskell-mooc/exercises/Set14b.hs, interpreted )
Ok, two modules loaded.
Loaded GHCi configuration from /tmp/haskell-stack-ghci/68be6ace/ghci-script
λ> 

thanks for catching that!