Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

At present I'm using ihaskell to learn about some libraries. IHaskell is still hazardous, and I can not do:

-- 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

Without "PackageImports", I get an error message:

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

My question is, is there a colon command inside ghci that would allow me to hide the cryptonite package?

like image 298
dsign Avatar asked Oct 09 '15 14:10

dsign


People also ask

What is the difference between GHC and ghci?

Introduction. GHCi is GHC's interactive environment, in which Haskell expressions can be interactively evaluated and programs can be interpreted.

What does ghci stand for Haskell?

3. Using GHCi — Glasgow Haskell Compiler 9.4.

How do I write a function in ghci?

Simply type a let followed by a newline: let ⏎. Then fac 0 = 1 ⏎. Then fac n = n * fac (n-1) ⏎ ⏎ and you're done!

How do I use Haskell ghci?

If you have installed the Haskell Platform, open a terminal and type ghci (the name of the executable of the GHC interpreter) at the command prompt. Alternatively, if you are on Windows, you may choose WinGHCi in the Start menu. And you are presented with a prompt. The Haskell system now attentively awaits your input.


1 Answers

Yes.

:set -hide-package cryptonite
like image 51
Reid Barton Avatar answered Oct 24 '22 18:10

Reid Barton