Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is cabal repl TARGET possible on starting ghci? #1840

Open
borgauf opened this issue Mar 10, 2024 · 0 comments
Open

Is cabal repl TARGET possible on starting ghci? #1840

borgauf opened this issue Mar 10, 2024 · 0 comments

Comments

@borgauf
Copy link

borgauf commented Mar 10, 2024

If I am in a Haskell project directory and have added packages to my executable build-depends section, is it possible to start haskell-mode REPL with the cabal command

cabal repl TARGET

or

cabal repl --build-depends "vector >= 0.12 && < 0.13"

IOW, I want to start the haskell-mode session with a REPL that can access exactly what my project has for (Hackage) packages and modules. I see the haskell-process-path-cabal variable, but don't know how to configure it in my init file. Again, basically, I just want the same Hackage packages (e.g. QuickSort, hmatrix, etc. that I've added to my regular project to be available in a haskell-mode ghci session. I set everything Haskell up with ghcup, BTW. I've tried in a terminal REPL session

λ> :set -package hmatrix
package flags have changed, resetting and loading new packages..

I try

λ> import Numeric.LinearAlgebra
λ> m = (3><4) [1..] :: Matrix Double
λ> m
(3><4)
[ 1.0, 2.0, 3.0, 4.0
, 5.0, 6.0, 7.0, 8.0
, 9.0, 10.0, 11.0, 12.0 ]

But none of this works with haskell-mode's REPL interpreter

λ> :set -package QuickCheck
cannot satisfy -package QuickCheck
(use -v for more information)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant