[Haskell-cafe] Using Data.String.Conversions

Viktor Dukhovni ietf-dane at dukhovni.org
Tue Jun 29 23:38:29 UTC 2021


On Tue, Jun 29, 2021 at 05:39:42PM -0500, Galaxy Being wrote:

> My problem is I can import and expose Data.Time, but
> Data.String.Conversions will not import to my global REPL. Any tips on
> doing this project-based would be enlightening too.

One thing that works is:

    $ cabal -z install --lib string-conversions
    Resolving dependencies...
    ...
    In order, the following will be built (use -v for more details):
     - utf8-string-1.0.2 (lib) (requires build)
     - string-conversions-0.4.0.1 (lib) (requires download & build)
    Completed    utf8-string-1.0.2 (lib)
    ...
    Completed    string-conversions-0.4.0.1 (lib)

    $ cabal repl -z
    λ> :set -package string-conversions
    package flags have changed, resetting and loading new packages...
    λ> import Data.String.Conversions as CS
    λ> :t cs
    cs :: ConvertibleStrings a b => a -> b
    λ>

There are surely other ways, that you might prefer, but this should get
you started.

-- 
    Viktor.


More information about the Haskell-Cafe mailing list