           unless @started
             @started = true
             @responseBuffer = []
+            @emitter.emit 'started'
             return
 
           @responseBuffer =

  onFinished: (callback) ->
    @emitter.on 'finished', callback

  onResponse: (callback) ->
    @emitter.on 'response', callback



  load: (uri) ->
    return unless @isActive()
    @finished = false
    @started = false
    @ghci.stdin.write ":load #{hsEscapeString uri}#{EOL}"

  reload: ->
    return unless @isActive()
    @finished = false
    @started = false
    @ghci.stdin.write ":reload#{EOL}"

  reloadRepeat: ->
    return unless @isActive()
    return unless @history.back[@history.back.length - 1]?
    @reload()
    disp = @onStarted =>
      @writeLines([@history.back[@history.back.length - 1]])
      disp.dispose()

  interrupt: ->
    if @ghci?
