         regex2.exec(item)[1]
       '+'+modules.join(' +')+' '+search
     ).then (search) ->
+        hooglePath=atom.config.get 'autocomplete-haskell.hooglePath'
         new Promise (resolve,reject) ->
-          CP.execFile 'hoogle',[search], {}, (error,data) ->
+          CP.execFile hooglePath,[search], {}, (error,data) ->
             if error
               reject(error)
               return

                line=line.slice(line.indexOf(' ')+1)
                [name,type]=line.split('::').map (line) ->
                  line.trim()
                type=type.slice(0,@trimTypeTo)+'...' if type.length>@trimTypeTo
                {
                  word: name
                  label: type

CP = require('child_process')

module.exports = AutocompleteHaskell =
  config:
      trimTypeTo:
        type: 'string'
        default: '50'
        description: 'Trim long types to this number of characters'
      hooglePath:
        type: 'string'
        default: 'hoogle'
        description: 'Path to hoogle executable'

  activate: ->
    provider =
