     return file for file in contents when isCabalFile(file)
 
   # Call into Cabal to parse the .cabal file
-  parseCabalFile: (path, callback) =>
+  parseCabalFile: (path, callback) ->
     fs.readFile path, {encoding: 'utf8'}, (err, data) ->
       HaskellCabal.parseDotCabal data, callback
 

          @emitBackendStatus 'error'

  getTargets: ->
    # TODO: get targets for current project

  getMenu: ->
    label: 'Cabal'
    submenu: [
      # This is obviously an example.
      {label: 'Test', command: 'ide-haskell-cabal:test'}
    ]

    #editor    = atom.workspace.activePaneItem
    #editorCwd = path.dirname(editor.getPath())
    #cabalRoot = findCabalRoot editorCwd
    target = opts.target

    [cabalRoot, cabalFile] = @findCabalFile atom.project.getPaths()[0]
    buildDir = @getConfigOpt 'buildDir'

    if cabalFile?
      cabalArgs =
        switch cmd
          when 'build', 'test'
            [cmd, '--only', '--builddir=' + buildDir]
          else
            [cmd, '--builddir=' + buildDir]
      cabalArgs.push target if target? and cmd is 'build'
      cabalProcess = new CabalProcess 'cabal', cabalArgs, @spawnOpts(cabalRoot), opts
    else
      @emitMessages [
        message: "No cabal file found"
