       @[i](opts[i])
 
     handleError = (error) =>
-      @emitter.emit 'response', "GHCI crashed" + EOL + "#{error}"
+      @emitter.emit 'response', "GHCI crashed\n#{error}"
       console.error error
       @ghci = null
       @emitter.emit 'exit', -1

      @ghci.stderr.pause()
      @errorBuffer = []
      @responseBuffer = []
      @ghci.stdin.write ":{#{EOL}"
      lines.forEach (line) =>
        @ghci.stdin.write line + EOL
      @emitter.emit 'input', lines.join('\n') + '\n'
      @ghci.stdin.write ":}#{EOL}"
      @ghci.stdout.resume()
      @ghci.stderr.resume()
      return true
    else
      @ghci.stdin.write lines.join(EOL)
      @emitter.emit 'response', "> \"#{lines.join('\\n')}\"#{EOL}"
      return true

  historyBack: (current) ->

      else
        tkill @ghci.pid, 'SIGINT'
    @finished = true
    @emitter.emit 'response', 'Interrupted\n'

  writeLines: (lines) =>
    return false unless @isActive()
