3

I'm trying to get idris-mode to work. I am using HEAD from both idris-dev and idris-mode. Whenever I execute C-l (idris-load-file) I get this error

Debugger entered--Lisp error: (file-error "make client process failed" "connection refused" :name "Idris Ideslave" :buffer "*idris-connection*" :host "127.0.0.1" :service 0 :nowait nil)
  make-network-process(:name "Idris Ideslave" :buffer "*idris-connection*" :host "127.0.0.1" :service 0 :nowait nil)
  open-network-stream("Idris Ideslave" "*idris-connection*" "127.0.0.1" 0)
  (setq idris-connection (open-network-stream "Idris Ideslave" (idris-buffer-name :connection) "127.0.0.1" port))
  .............snipped

Whenever I try M-x idris-repl it states Buffer *idris-repl* has no process.

The result from this thread was to update the projects from git. However I'm using the most up-to-date versions from each project.

edit: running make also fails, but that's probably a different issue. If I manually checkout 0.9.16, make will pass but the same issue above persists.

edit: I do not have this installed locally, I am running it out of a cabal sandbox. In idris-settings.el I changed idris-interpreter-path to the full path of idris. Also, when I run idris outside of emacs I get errors about not finding prelude or builtins. If I add -i path/to/idris/libs/prelude then everything works. But adding "-i path/to/idris/libs/prelude" to idris-interpreter-flags in idris-settings.el does not help

Community
  • 1
  • 1
pdexter
  • 811
  • 8
  • 16

1 Answers1

3

I've sort of solved this. For idris-interpreter-flags you must give each actual argument as a separate string (which is common, I should have known). So, if I set idris-interpreter-flags to '("-i" "/path/to/idris/libs/prelude") then all is good. So I have to add the path for each of the libraries' directories that idris comes with.

How does this work? Is this normal to require? Is it because I'm not running this as a true cabal installed package that it doesn't pick up on the libraries?

pdexter
  • 811
  • 8
  • 16
  • Yes, if it's not a cabal installation then it won't be looking in the right place. I recently added a `IDRIS_LIBRARY_PATH` flag to tell it where to find libraries - you might be able to use that. – Brian McKenna Mar 23 '15 at 22:49