So, it’s 100% possible I’m doing something to screw this up, and if so: my apologies, and hurray for learning something new.
The following is the process outlined in the appendix. He first offers global lib instructions, then this for local. Similar sort of thing, really, just changes where the config file gets stored. He recommends renaming the config file and installing all the libraries you’re interested in at once if you want more than one. The example he gives for that is: cabal install --lib gnuplot gloss cyclotomic --package-env .
for local, cabal install --lib gnuplot gloss cyclotomic
for global. (See page 585 of the print edition.)
andrew@ajf-mbp temp % ghci
GHCi, version 9.6.3: https://www.haskell.org/ghc/ :? for help
ghci> 2 + 2
4
ghci> :q
Leaving GHCi.
andrew@ajf-mbp temp % cabal install --lib gnuplot --package-env .
Resolving dependencies...
andrew@ajf-mbp temp % ghci
Loaded package environment from /Users/andrew/dev/temp/.ghc.environment.aarch64-darwin-9.6.3
GHCi, version 9.6.3: https://www.haskell.org/ghc/ :? for help
ghci> :m Graphics.Gnuplot.Simple
ghci> :t plotFunc
plotFunc
:: (Graphics.Gnuplot.Value.Atom.C a,
Graphics.Gnuplot.Value.Tuple.C a) =>
[Attribute] -> [a] -> (a -> a) -> ghc-prim:GHC.Types.IO ()
ghci> 2 + 2
<interactive>:3:3: error: [GHC-88464]
Variable not in scope: (+) :: t0 -> t1 -> t
ghci> :q
Leaving GHCi.
andrew@ajf-mbp temp % cat .ghc.environment.aarch64-darwin-9.6.3
clear-package-db
global-package-db
package-db /Users/andrew/.cabal/store/ghc-9.6.3/package.db
package-id gnplt-0.5.7-1f7a223d
So, base
doesn’t get loaded, which is easy enough to fix. But, I feel like that’s something you don’t really want to expose a complete beginner to. I’m a bit puzzled as to what the author thought ought to happen here, which is why I’m assuming I’m doing something dumb myself.
-e- It was the very first post in this thread that prompted me to go look up what LPWFP suggested.