Sorry, but this didn't work for me. First,
$ cabal -z install --lib string-conversions
cabal: unrecognized 'install' option `-z'
however, without -z it does run and performs an install as you indicate . . . but then the rest doesn't work, i.e.,
$ cabal repl -z
> :set -package string-conversions
<no location info>: error:
Could not load module ‘Data.String.Conversions’
It is a member of the hidden package ‘string-conversions-0.4.0.1’.
Perhaps you need to add ‘string-conversions’ to the build-depends in your .cabal file.
However, this did work
$ stack install string-conversions
tf8-string > using precompiled package
string-conversions> configure
string-conversions> Configuring string-conversions-0.4.0.1...
string-conversions> build
string-conversions> Preprocessing library for string-conversions-0.4.0.1..
string-conversions> Building library for string-conversions-0.4.0.1..
string-conversions> [1 of 2] Compiling Data.String.Conversions
...
then
$ stack ghci --package string-conversions
...
Prelude> import Data.String.Conversions as CS
Prelude CS> :t cs
cs :: ConvertibleStrings a b => a -> b
But, now I am able to follow your cabal way and it does work.
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?