Skip to content

mtl module is member of hidden package #128

Closed
@yaitskov

Description

@yaitskov

Hi,

I noticed that modules from some packages are not available inside interpreter, while rest packages are loadable. I don't see why behavour is different.
In my case mtl package is in trouble but text package is not!
Both packages are on the same dependency list.

Could not load module \8216Control.Monad.State.Strict\8217\n It is a member of the hidden package \8216mtl-2.2.2\8217.\n You can run \8216:set -package mtl\8217 to expose it.\n (Note: this unloads all the modules in the current scope.)\n Use -v (or :set -vin ghci) to see a list of the files searched for."}]

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}

module Hello where

import Prelude (String, (++), Char, Int)
import Control.Monad.State.Strict
import Data.Functor.Identity
import Data.Text

countDown :: StateT Int Identity ()
countDown = do
  i <- get
  if (i > 0)
  then do
    put (i - 1)
    countDown
  else pure ()

strFromText :: String
strFromText = unpack ("HELLO TEXT" :: Text)

ghc 8.10.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions