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

Matrix.transpose producing something very unlike what Matrix.identity produces #66

Open
JeffreyBenjaminBrown opened this issue Jun 8, 2017 · 3 comments

Comments

@JeffreyBenjaminBrown
Copy link

Evaluating (Matrix.transpose ’((1 2 3) (4 5 6))) prints something weird to the message-buffer:

Takes a matrix (a list of lists of ints) and returns its transposition.
" (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\.transpose) (list x1)))))) (quote ((haskell-emacs--get 0)))))), 2

However, another function defined at .emacs.d/haskell-fun/Matrix.hs behaves like you might expect: (Matrix.identity 1) prints ((1)) in the message buffer.

I evaluated those expressions from within a buffer, using C-x C-e. I'm running GNU Emacs 26.0.50 in Ubuntu. I chose stack when prompted during installation of haskell-emacs.

@JeffreyBenjaminBrown
Copy link
Author

It's even weirder than I thought.

(Matrix.transpose '((1 2)
		    (3 4)
		    (5 6)
		    ))

prints a simple ((1 3 5) (2 4 6)) to the message buffer. However,

(Matrix.transpose ’((1 2 3)
		    (4 5 6)
		    ))

prints this instead:

macroexpand: Wrong number of arguments: (lambda (x1) "transpose :: [[Int]] -> [[Int]]

Takes a matrix (a list of lists of ints) and returns its transposition.
" (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\.transpose) (list x1)))))) (quote ((haskell-emacs--get 0)))))), 2

@georgewsinger
Copy link

@JeffreyBenjaminBrown : Out of curiosity, are you executing these functions with Emacs 25?

@JeffreyBenjaminBrown
Copy link
Author

When I try to evaluate any of these commands now, I get a void-function error.

I've been running Emacs 26.0.50 (and the same OS -- my previous comment was in error) since I started this issue. Thinking it had gotten uninstalled somehow, I ran package-list-packages and found haskell-emacs-base on the list, so I asked to install it. I got messages like it was working but it never said it was done installing. Then I looked in haskell-fun and found files I had added to it before, as well as the things that installed initially (HaskellEmacs.hs, Matrix.hs, ...).

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

2 participants