   doCheckOrLintBuffer: (cmd, buffer, callback) =>
     @withTempFile buffer.getText(), (path,close) =>
       command = [cmd,path]
-      @queueCmd @runModCmd, @getRootDir(buffer), command, (lines) ->
+      @queueCmd 'checklint',@runModCmd,@getRootDir(buffer),command,(lines) ->
         close()
         results = []
         lines.forEach (line) ->

  onBackendIdle: (callback) =>
    @emitter.on 'backend-idle', callback

  queueCmd: (runFunc, rootDir, command, callback) =>
    @commandQueue.push({f:runFunc,rd:rootDir,cmd:command,cb:callback})
    @runQueuedCommands()

  runQueuedCommands: =>
    if @commandQueue.length == 0
      @emitter.emit 'backend-idle'
      return
    else if @commandRunning
      return

    @commandRunning = true
    {f,rd,cmd,cb}=@commandQueue.shift()
    @emitter.emit 'backend-active', cmd.join(' ')
    f rd, cmd, (lines) =>
      cb lines
      @commandRunning=false
      @runQueuedCommands()

  runCmd: (rootDir, command, callback) =>
    unless atom.config.get('haskell-ghc-mod.enableGhcModi')

module.exports =
class GhcModiProcess
  processMap: null
  commandQueues:
    checklint:
      running: false
      queue: []
    completion:
      running: false
      queue: []
    typeinfo:
      running: false
      queue: []

  constructor: ->
    @processMap = new WeakMap
