[Haskell-cafe] Global Package Install

Viktor Dukhovni ietf-dane at dukhovni.org
Thu Feb 18 20:48:57 UTC 2021


On Thu, Feb 18, 2021 at 03:35:10PM -0500, Viktor Dukhovni wrote:

> You can use "cabal repl -z" to run ghci with the Cabal "user" package
> database in scope:
> 
>     $ cabal repl -z
>     [...]
>     λ> :set -XOverloadedStrings
>     λ> :set -package iproute

Or you can also put some of the requirements on the command-line, and
drop the verbose start up messages via:

    $ cabal repl -v0 -z --repl-options -package=iproute --repl-options -XOverloadedStrings
    λ> import Data.IP
    λ> import Numeric
    λ> showHex (fromIPv4w "127.0.0.1") ""
    "7f000001"

This way, you can define shell aliases for frequently used combinations
of parameters.

-- 
    Viktor.


More information about the Haskell-Cafe mailing list