<div dir="ltr">Sorry, but this didn't work for me. First,<div><br></div><div><font face="monospace">$ cabal -z install --lib string-conversions</font></div><font face="monospace">cabal: unrecognized 'install' option `-z'</font><div><br></div><div>however, without -z it does run and performs an install as you indicate . . . but then the rest doesn't work, i.e., </div><div><br></div><div><font face="monospace">$ cabal repl -z</font><br></div><div><font face="monospace">> :set -package string-conversions</font></div><div><font face="monospace"><no location info>: error:<br>    Could not load module ‘Data.String.Conversions’<br>    It is a member of the hidden package ‘string-conversions-0.4.0.1’.<br>    Perhaps you need to add ‘string-conversions’ to the build-depends in your .cabal file.<br></font></div><div><font face="monospace"><br></font></div><div><font face="arial, sans-serif">However, this did work</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="monospace">$ stack install string-conversions<br></font></div><div><font face="monospace">tf8-string       > using precompiled package<br>string-conversions> configure   <br>string-conversions> Configuring string-conversions-0.4.0.1...<br>string-conversions> build       <br>string-conversions> Preprocessing library for string-conversions-0.4.0.1..<br>string-conversions> Building library for string-conversions-0.4.0.1..<br>string-conversions> [1 of 2] Compiling Data.String.Conversions<br></font></div><div><font face="monospace">...</font></div><div><br></div><div>then </div><div><br></div><div><font face="monospace">$ stack ghci --package string-conversions<br></font></div><div><font face="monospace">...</font></div><div><br></div><div><font face="monospace">Prelude> import Data.String.Conversions as CS<br></font></div><div><font face="monospace"><br></font></div><div><font face="monospace">Prelude CS> :t cs<br>cs :: ConvertibleStrings a b => a -> b</font><br></div><div><br></div><div><b>But</b>, now I am able to follow your cabal way and it does work.</div><div><br></div><div>So this is very confusing for a beginner. But happy ending this time. Any lessons I can learn from this? For example, why was this so difficult?</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 29, 2021 at 6:44 PM Viktor Dukhovni <<a href="mailto:ietf-dane@dukhovni.org">ietf-dane@dukhovni.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Jun 29, 2021 at 05:39:42PM -0500, Galaxy Being wrote:<br>
<br>
> My problem is I can import and expose Data.Time, but<br>
> Data.String.Conversions will not import to my global REPL. Any tips on<br>
> doing this project-based would be enlightening too.<br>
<br>
One thing that works is:<br>
<br>
    $ cabal -z install --lib string-conversions<br>
    Resolving dependencies...<br>
    ...<br>
    In order, the following will be built (use -v for more details):<br>
     - utf8-string-1.0.2 (lib) (requires build)<br>
     - string-conversions-0.4.0.1 (lib) (requires download & build)<br>
    Completed    utf8-string-1.0.2 (lib)<br>
    ...<br>
    Completed    string-conversions-0.4.0.1 (lib)<br>
<br>
    $ cabal repl -z<br>
    λ> :set -package string-conversions<br>
    package flags have changed, resetting and loading new packages...<br>
    λ> import Data.String.Conversions as CS<br>
    λ> :t cs<br>
    cs :: ConvertibleStrings a b => a -> b<br>
    λ><br>
<br>
There are surely other ways, that you might prefer, but this should get<br>
you started.<br>
<br>
-- <br>
    Viktor.<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>⨽<br></div>Lawrence Bottorff<div>Grand Marais, MN, USA</div><div><a href="mailto:borgauf@gmail.com" target="_blank">borgauf@gmail.com</a></div></div></div>