是否有隐藏包的 ghci 冒号命令?

Is there a ghci colon-command to hide a package?

目前我正在使用ihaskell 学习一些库。 IHaskell 还是很危险,我做不到:

-- This doesn't work:   ":ext PackageImports", the kernel hangs
-- This doesn't work:   "{-# LANGUAGE PackageImports #-}", the kernel hangs
import Codec.Crypto.RSA.Pure
import qualified "crypto-api" Crypto.Random                                         as CR
import           Control.Monad.CryptoRandom

没有 "PackageImports",我收到一条错误消息:

Ambiguous interface for ‘Crypto.Random’: it was found in multiple packages: crypto-api-0.13.2 cryptonite-0.7

我的问题是,在 ghci 中是否有一个冒号命令可以让我隐藏 cryptonite 包?

是的。

:set -hide-package cryptonite