[haskeline] #79: Emacs and haskeline (or GHCi) do not interact very well

haskeline haskeline at projects.haskell.org
Mon Nov 19 10:01:02 GMT 2012


#79: Emacs and haskeline (or GHCi) do not interact very well
-------------------+--------------------------------------------------------
Reporter:  nad     |        Owner:  judah
    Type:  defect  |       Status:  new  
Priority:  minor   |    Milestone:       
 Version:  0.6     |   Resolution:       
Keywords:          |  
-------------------+--------------------------------------------------------

Comment(by nad):

 Replying to [comment:9 aleksey]:
 > Replying to [ticket:79 nad]:
 > > Is there a known (simple) workaround for the problem?
 >
 > `cat | ghci` instead of `ghci` works for me in shell-mode.

 I've been using a custom implementation of "comint-input-sender":
 {{{
   ...
   (set (make-local-variable 'comint-input-sender) 'agda2-send)
   ...
 }}}
 Implementation of agda2-send:
 {{{
   (defun agda2-send (proc s)
     "Sends the string S to PROC.
   Splits up S into small chunks and sends them one after the other,
   because when GHCi is used in shell buffers it chokes on overly
   long strings (some versions of GHCi, on some systems)."
     (let* ((chunk-size 200))
       (dolist (chunk (agda2-chunkify chunk-size s))
         (comint-send-string proc chunk)))
     (comint-send-string proc "\n"))
 }}}
 Agda no longer uses GHCi, though.

-- 
Ticket URL: <http://trac.haskell.org/haskeline/ticket/79#comment:10>
haskeline <http://example.org/>
My example project


More information about the Haskeline mailing list