Ticket #83 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

ghci doesn't accept entire input from GNU Screen

Reported by: renick Owned by: judah
Priority: major Milestone:
Version: Keywords:
Cc:

Description

ghci-haskeline-0.1.1

haskeline-0.6.1.6

GHCi, version 6.10.3

Using vim via screen with this plugin:

http://renick-bell.blogspot.com/2009/05/send-text-from-vim-to-any-repl.html

> let { o = lfSaw kr (mce2 8 7.23) 0 * 3 + 80
>     ; f = lfSaw kr 0.4 0 * 24 + o
>     ; s = sinOsc ar (midiCPS f) 0 * 0.04 }
> in audition (out 0 (combN s 0.2 0.2 4))

should appear in ghci as

:{
let { o = lfSaw kr (mce2 8 7.23) 0 * 3 + 80
    ; f = lfSaw kr 0.4 0 * 24 + o
    ; s = sinOsc ar (midiCPS f) 0 * 0.04 }
in audition (out 0 (combN s 0.2 0.2 4))
:}

When using ghci 6.10.1, it did. Now, the same input appears in ghci as:

> :{
*HSC3| 23) 0 * 3 + 80
*HSC3| r 0.4 0 * 24 + o
*HSC3| c ar (midiCPS f) 0 * 0.04 }
*HSC3| udition (out 0 (combN s 0.2 0.2 4))
*HSC3|

Using my vim script to insert into another vim buffer via screen works flawlessly; I think there has to be something going on in either ghci or haskeline.

Thanks for your efforts!

Change History

Changed 5 years ago by judah

  • owner set to judah
  • status changed from new to assigned

Thanks for the report! I'm having trouble getting the plugin to work correctly, though. I can get :SendtoreplSend working fine, but when I type :SendtoreplSendBlock it doesn't appear to work with ghci-6.8.3 or ghci-6.10.1. Instead, the screened ghci session displays a block with one blank line:

Prelude> :{
Prelude| 
Prelude| :}

Any tips? Where should the cursor be when I type the command?

Changed 5 years ago by judah

Never mind, I can get your plugin working now (after learning a decent amount more about vim - scripting looks like fun).

However, I can't reproduce the issue with ghci-haskeline+haskeline-0.6.1.6; though I can reproduce it with ghci-6.10.3.

I should have mentioned that once you install ghci-haskeline it needs to be called as such, e.g.

screen -S haskellSession -t haskellSession ~/.cabal/bin/ghci-haskeline

Does that fix it?

Changed 5 years ago by renick

I had not realized your solution meant using a different ghci executable. Yes, now my script works fine if I use:

~/.cabal/bin/ghci-haskeline

Thanks for your help!

Changed 5 years ago by judah

  • status changed from assigned to closed
  • resolution set to fixed

Good to hear; thanks for the update.

Note: See TracTickets for help on using tickets.