Comments (10)
Where are you putting the .ghci file? Try with:
.ghci:
putStrLn ".ghci works!"
In the same directory as your .cabal file. Then when you start the process, have a look in the *haskell-process-log*
buffer and do a search for β.ghci worksβ, it should be in there. If not, seems your ghci or cabal-dev differs to mine in some way. Which would be surprising, but we would need to address that with some elisp-level configuration as you suggest. Let me know.
from haskell-mode.
My .ghci works fine. Putting command line in it does not work (probably not supported ?) I tried outside of emacs.
:set -Llib -lpdf
has no effect.
And yes, putStrLn ".ghci works!", fires up fine.
from haskell-mode.
Ah, I understand. The -L and -l have no effect from the .ghci file, though everything else in the .ghci file runs.
How would you like to specify project-specific options to the inferior Haskell process?
from haskell-mode.
Perhaps when it starts asking questions about cabal folder etc. one of the questions could be ghci arguments. With default (enter) nothing. One thing though, params must be a list, not a string.
I made it work like this: haskell-process.el
(defcustom haskell-process-ghci-args nil
"Args for ghci"
:group 'haskell
:type '(choice string (repeat string)))
and then
(apply 'start-process (haskell-session-name session)
nil
haskell-process-path-ghci haskell-process-ghci-args)
and in my init file:
(custom-set-variables
'(haskell-process-ghci-args (list "-Llib" "-lpdf"))
)
but this is global, not per project.
I tried to pass one string "-Llib -lpdf". But that does not work. It must be a list.
I do not know how you gonna do it. Take one string and then split it by spaces, or repeatedly ask arguments until the first empty one.
from haskell-mode.
Even better would be to fix cabal to accept -L -l from .ghci.
from haskell-mode.
You mean GHCi?
from haskell-mode.
ah yes :) ghci
from haskell-mode.
actually here's the thing. I already have these options in .cabal file. I'm not sure if you are reading them and passing them to ghci. But if you are maybe you can read these options form cabal file :
extra-lib-dirs: lib
extra-libraries: pdf
This would be ideal, no need for extra questions.
from haskell-mode.
cabal-dev ghci
should handle that. Does it not?
from haskell-mode.
i do not use cabal-dev. hmm perhaps i should.
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.