Comments (8)
I should note that haskell-process-cabal-build
does work, and the repl seems to have the correct module loaded.
from haskell-mode.
I don't think this is anything to do with haskell-mode.
Try:
$ ghci
> :l yourfile.hs
If it doesn't work please close this ticket.
from haskell-mode.
That doesn't work because my system has MonadCatchIO-transformers and MonadCatchIO-mtl. But my cabal file only selects one of these, so haskell-mode should be clever enough to do the same.
from haskell-mode.
So this is a feature request to run GHCi with Cabal dependency information and options.
I think cabal interactive
will provide such a feature and cabal-ghci provides it in the mean time. Not sure it's worth bothering re-implementing such code in Emacs.
from haskell-mode.
Yes, the problem is that ghci does not care about your .cabal file and thus will not hide packages not listed in the .cabal file. One fix is to define a .ghci file that hides one of those packages.
from haskell-mode.
Well I've put a .ghci
file in src, so it works fine from the command line if I launch ghci in there. However, the GHCI that is launched by haskell-emacs doesn't seem to respect that working directory. It seems it instead launches GHCI and then does a :cd. If I add ~/.ghci
then it does work, but this doesn't quite seem like a solution. Thoughts?
from haskell-mode.
Try popping it in the same directory as your .cabal
file, that's where it starts the process (and then indeed, it does :cd
into the working directory). Should work?
from haskell-mode.
Aha - perfect, thank you! Apologies for somewhat wasting your time.
from haskell-mode.
Related Issues (20)
- C-c C-c `haskell-process-cabal-build` won't work if haven't ran C-c C-l
- Cabal repl without a cabal file
- tree-sitter HOT 1
- add topics HOT 1
- Feature request: "cabal repl" with file target HOT 1
- Haskell repl freezes when I run getChar HOT 1
- string-trim-left redefinition vs quasi-quote tests in emacs 29.1 HOT 3
- Should `haskell-cabal` mode derive from `prog-mode`? HOT 4
- Color escape sequences from `cabal repl` causing garbled output (Cabal 3.10.1.0) HOT 3
- `deriving someStrategy ...` breaks indentation in the rest of the file
- flymake-allowed-file-name-masks is void HOT 3
- haskell-cabal: bad indentation with redundant leading comma
- error "Marker does not point anywhere"
- Symbol's value as variable is void: flymake-allowed-file-name-masks HOT 6
- An interface for hoogle HOT 5
- Add {-# LANGUAGE Data #-} to the top of the file? (y or n) HOT 2
- Loading a file under test-suite fails when importing library
- Parse error for Haskell sections
- Is cabal repl TARGET possible on starting ghci?
- automatically change session target based on buffer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haskell-mode.