         ]
       ]
 
-    disposables
+    @disposables
 
   provideLinter: ->
     return unless atom.config.get 'haskell-ghc-mod.useLinter'


  activate: (state) ->
    @process = new GhcModiProcess

  deactivate: ->
    @process?.destroy()
    @process = null
    @completionBackend = null

  provideCompletionBackend: ->
    @completionBackend ?= new CompletionBackend @process
    @completionBackend

  consumeUPI: (upi) ->
    disposables = new CompositeDisposable
    disposables.add upi.disposables

    upi.setMessageTypes
      error: {}
      warning: {}
      lint: {}

    disposables.add atom.commands.add 'atom-workspace',
      'haskell-ghc-mod:shutdown-backend': =>
        @process?.killProcess?()


        @process.doLintBuffer buffer, (res) ->
          upi.setMessages res, ['lint']

    @disposables.add @process.onBackendActive ->
      upi.setStatus status: 'progress'

    @disposables.add @process.onBackendIdle ->
      upi.setStatus status: 'ready'

    @process.onBackendActive
