       @process.on 'exit', (code) =>
         @ghci = null
         if code isnt 0
-          @emitter.emit 'error', @errorBuffer.join(EOL) + EOL
+          @emitter.emit 'error', @errorBuffer.join('\n') + '\n'
         @emitter.emit 'exit', code
         @disposables.dispose()
 

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

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

              @responseBuffer.slice(0, -2)

          # TODO: Show that command finished
          @emitter.emit 'error', @errorBuffer.join('\n') + '\n'
          @errorBuffer = []
          if @response
            @emitter.emit 'response', @responseBuffer.join('\n') + '\n'
            @response = false
          else
            @emitter.emit 'message', @responseBuffer.join('\n') + '\n'
          @responseBuffer = []
      @process.stderr.on 'data', buffered (lines) =>
        lines.forEach (line) ->
