-
Notifications
You must be signed in to change notification settings - Fork 339
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
Does ghci mode recognize cabal sandboxes? #398
Comments
Just tried this now:
The result: So yes, it's possible. |
Configured emacs to have
|
Hmm, not sure why you saw different results. I'll reopen this, then, until we've figured it out. My process log looks similar, but without the abnormal exit:
|
I'm working with a fresh git clone, too. From my ;; Haskell mode
(add-to-list 'load-path "/usr/share/emacs/site-lisp/haskell-mode/")
(require 'haskell-mode-autoloads)
(add-to-list 'Info-default-directory-list "/usr/share/emacs/site-lisp/haskell-mode/")
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'interactive-haskell-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
(custom-set-variables
'(haskell-process-suggest-remove-import-lines t)
'(haskell-process-auto-import-loaded-modules t)
'(haskell-process-log t))
;; '(haskell-process-type 'ghci))
(define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload)
(define-key haskell-mode-map (kbd "C-c h b") 'haskell-interactive-bring)
(define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type)
(define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info)
(define-key haskell-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build)
(define-key haskell-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear)
(define-key haskell-mode-map (kbd "C-c c") 'haskell-process-cabal)
(define-key haskell-mode-map (kbd "SPC") 'haskell-mode-contextual-space) I specify the load path at the top because it's a |
Steps:
module ShellyTest where
import Shelly
|
Did you do a And do you have a |
No to both. The idea is that I just want to be able to make a new directory, lay down a sandbox, install some one-shot libraries, and play with them with |
OK, I just tried it, and it works for me (and I have Maybe try with a minimal config for emacs to check this? As a comparison, here's my log:
|
Still isn't working, and this is all I have in my (add-to-list 'load-path "/usr/share/emacs/site-lisp/haskell-mode/")
(require 'haskell-mode-autoloads)
(add-to-list 'Info-default-directory-list "/usr/share/emacs/site-lisp/haskell-mode/")
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'interactive-haskell-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
(custom-set-variables
'(haskell-process-suggest-remove-import-lines t)
'(haskell-process-auto-import-loaded-modules t)
'(haskell-process-log t))
(define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload)
(define-key haskell-mode-map (kbd "C-c h b") 'haskell-interactive-bring)
(define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type)
(define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info)
(define-key haskell-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build)
(define-key haskell-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear)
(define-key haskell-mode-map (kbd "C-c c") 'haskell-process-cabal)
(define-key haskell-mode-map (kbd "SPC") 'haskell-mode-contextual-space)
(global-set-key (kbd "C-c h r") 'haskell-process-restart) |
Any word on this? |
Just to confirm: by a "fresh git clone" you mean of the haskell-mode repository? What I've done:
How are you installing your |
Okay, changing pkgname=emacs-haskell-mode-git
pkgver=20120523
pkgrel=1
_gitname="haskell-mode"
_gitnamebranch="haskell-mode"
_gitroot="git://github.com/haskell/$_gitname"
pkgdesc="Haskell syntax highlighting, etc. for GNU Emacs"
arch=('any')
url="https://github.com/haskell/$_gitname"
depends=('emacs')
makedepends=('git')
license=('GPL')
provides=('emacs-haskell-mode')
conflicts=('emacs-haskell-mode')
install=$pkgname.install
build() {
# create persistent build directory
mkdir -p $startdir/src
cd $startdir/src
if [[ -d $_gitnamebranch ]]; then
cd $_gitnamebranch
git clean -dxf
git reset --hard
msg "Pulling from GIT server..."
git pull --rebase
else
git clone --depth 1 $_gitroot $_gitnamebranch
cd $_gitnamebranch
git pull --rebase
fi
# generate the haskell-mode-autoloads.el file and also execute byte compilation
make all
}
package() {
# create destination path
install -d $pkgdir/usr/share/emacs/site-lisp/$_gitnamebranch
# copy over all files into path
cp -r $startdir/src/$_gitnamebranch/* $pkgdir/usr/share/emacs/site-lisp/$_gitnamebranch
} |
Also just tried your method, by uninstalling the Arch package and linking instead to my elpa version. ;; Haskell mode
(add-to-list 'load-path "/home/colin/.emacs.d/elpa/haskell-mode-20141230.1141")
(load "haskell-mode-autoloads.el")
(add-to-list 'Info-default-directory-list "/home/colin/.emacs.d/elpa/haskell-mode-20141230.1141")
;; etc ... ... and it still dies with the same error, following the same steps you did. |
So do you have a different |
@fosskers just to be sure, you tried it with |
I'm on |
|
If you follow what I did, I did |
I've managed to succeed in following your instructions, in that I can open my test file with a minimal config (I can tell because a lot of my customisations are missing) but unfortunately |
Interesting, when I run the program
The exit code is also coming out as 1. What do you see? |
Just to double-check: what does
|
Solution: Have the latest The Arch Note: I had to restart my emacs daemon once to (I assume) get it to "see" the newer cabal binary. Thanks a lot for your help and patience guys. |
Forgive me if this has been asked before, or if the solution is trivial. I'd like to be able to install libraries in a sandbox, then play with them in an emacs session without making a full cabal project (similar to this post on stackoverflow).
Is this possible?
The text was updated successfully, but these errors were encountered: