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

haskell-emacs-init fails in spacemacs #67

Open
georgewsinger opened this issue Jul 8, 2017 · 4 comments
Open

haskell-emacs-init fails in spacemacs #67

georgewsinger opened this issue Jul 8, 2017 · 4 comments

Comments

@georgewsinger
Copy link

georgewsinger commented Jul 8, 2017

When running haskell-emacs-init in spacemacs I get the error:

Error in process filter: Selecting Deleted Buffer

Emacs then is generally unresponsive for several seconds unless I press C g. If re-run haskell-emacs-init, I get at the bottom a prompt Lisp expression:.

@georgewsinger
Copy link
Author

georgewsinger commented Jul 9, 2017

Now when attempting to re-install spacemacs and haskell-emacs I am getting

Add a simple example? (y or n) y
Is stack the correct build tool? (y or n) y
Booting up intero ...
Saving file /home/george/.emacs.d/haskell-fun/Matrix.hs...
Wrote /home/george/.emacs.d/haskell-fun/Matrix.hs
helm-M-x: Opening input file: No such file or directory, /home/george/.emacs.d/haskell-fun/HaskellEmacs.hs
error in process filter: intero-read-buffer: Selecting deleted buffer
error in process filter: Selecting deleted buffer
error in process filter: intero-read-buffer: Selecting deleted buffer
error in process filter: Selecting deleted buffer

And it seems that the only thing being generated in haskell-fun is the lone Matrix.hs file.

@georgewsinger
Copy link
Author

After pasting HaskellEmacs.hs from the GitHub repo into haskell-fun/HaskellEmacs.hs (with no other files in haskell-fun), I now get a bunch of intero errors when compiling. I only get this once, however, and if I re-run haskell-emacs it says it successfully compiles (and indeed there is a stack project populated in haskell-fun). Maybe intero is the issue?

In any event, the stock functions like Matrix.identity are now being populated into emacs. The problem now is that when I run, i.e., (Matrix.identity 3) (like in the README) I get:

Debugger entered--Lisp error: (invalid-function (lambda t "identity :: Int -> [[Int]]

Returns an identity matrix of size n.
" (cons (quote progn) (cons (list (quote process-send-string) (quote haskell-emacs--proc) (list (quote format) "%S" (list (quote haskell-emacs--optimize-ast) (list (quote quote) (cons (quote Matrix\.identity) (list . t)))))) (quote ((haskell-emacs--get 0)))))))
  (lambda t "identity :: Int -> [[Int]]\n\nReturns an identity matrix of size n.\n" (cons (quote progn) (cons (list (quote process-send-string) (quote haskell-emacs--proc) (list (quote format) "%S" (list (quote haskell-emacs--optimize-ast) (list (quote quote) (cons ... ...))))) (quote ((haskell-emacs--get 0))))))(3)
  macroexpand((Matrix\.identity 3) nil)
  macroexp-macroexpand((Matrix\.identity 3) nil)
  macroexp--expand-all((Matrix\.identity 3))
  macroexpand-all((Matrix\.identity 3))
  eval-sexp-add-defvars((Matrix\.identity 3))
  elisp--eval-last-sexp(nil)
  #[257 \20\303

@PlumpMath
Copy link

When will this problem be resolved ?;
It's been two years, but I really want to use it.
I hope the original author solved it in nixos.
I'm using spacemacs. Currently I am using vanilla emacs, but I am getting the same error.
Did you solve it?

@aezarebski
Copy link

This may no longer be a problem; it seems to be working with the following setup.

Spacemacs v.0.200.13
stack version 2.1.3
GNU Emacs version 6.3

I installed via the dotspacemacs-additional-packages by adding the following to the .spacemacs file.

dotspacemacs-additional-packages '(haskell-emacs :location (recipe :fetcher github :repo "knupfer/haskell-emacs"))

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

3 participants