Skip to content

Commit a8d2f1a

Browse files
author
galagora
committed
Remove Hayoo
1 parent 33be58b commit a8d2f1a

File tree

4 files changed

+6
-67
lines changed

4 files changed

+6
-67
lines changed

haskell-commands.el

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -192,29 +192,6 @@ MODULE-BUFFER is the actual Emacs buffer of the module being loaded."
192192
(defvar haskell-cabal-targets-history nil
193193
"History list for session targets.")
194194

195-
(defun haskell-process-hayoo-ident (ident)
196-
"Hayoo for IDENT, return a list of modules"
197-
;; We need a real/simulated closure, because otherwise these
198-
;; variables will be unbound when the url-retrieve callback is
199-
;; called.
200-
;; TODO: Remove when this code is converted to lexical bindings by
201-
;; default (Emacs 24.1+)
202-
(let ((url (format haskell-process-hayoo-query-url (url-hexify-string ident))))
203-
(with-current-buffer (url-retrieve-synchronously url)
204-
(if (= 200 url-http-response-status)
205-
(progn
206-
(goto-char url-http-end-of-headers)
207-
(let* ((res (json-read))
208-
(results (assoc-default 'result res)))
209-
;; TODO: gather packages as well, and when we choose a
210-
;; given import, check that we have the package in the
211-
;; cabal file as well.
212-
(cl-mapcan (lambda (r)
213-
;; append converts from vector -> list
214-
(append (assoc-default 'resultModules r) nil))
215-
results)))
216-
(warn "HTTP error %s fetching %s" url-http-response-status url)))))
217-
218195
(defun haskell-process-hoogle-ident (ident)
219196
"Hoogle for IDENT, return a list of modules."
220197
(with-temp-buffer

haskell-customize.el

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,6 @@ Flycheck users might like to disable this."
214214
:type 'boolean
215215
:group 'haskell-interactive)
216216

217-
(defcustom haskell-process-suggest-hayoo-imports
218-
nil
219-
"Suggest to add import statements using Hayoo as a backend."
220-
:type 'boolean
221-
:group 'haskell-interactive)
222-
223-
(defcustom haskell-process-hayoo-query-url
224-
"http://hayoo.fh-wedel.de/json/?query=%s"
225-
"Query url for json hayoo results."
226-
:type 'string
227-
:group 'haskell-interactive)
228-
229217
(defcustom haskell-process-suggest-haskell-docs-imports
230218
nil
231219
"Suggest to add import statements using haskell-docs as a backend."

haskell-hoogle.el

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; haskell-hoogle.el --- Look up Haskell documentation via hoogle or hayoo -*- lexical-binding: t; -*-
1+
;;; haskell-hoogle.el --- Look up Haskell documentation via hoogle -*- lexical-binding: t; -*-
22

33
;; Copyright © 2015 Steve Purcell
44
;; 2016 Arthur Fayzrakhmanov
@@ -21,7 +21,7 @@
2121

2222
;;; Commentary:
2323

24-
;; Functions for looking up documentation with hayoo or hoogle, via
24+
;; Functions for looking up documentation with hoogle, via
2525
;; either local or remote servers.
2626

2727
;;; Code:
@@ -30,15 +30,13 @@
3030
(require 'haskell-mode)
3131
(require 'haskell-utils)
3232

33-
(defun hoogle-prompt (&optional hayoo?)
33+
(defun hoogle-prompt ()
3434
"Prompt for Hoogle query."
35-
(let ((def (haskell-ident-at-point))
36-
(hoogle-or-hayoo "Hoogle"))
35+
(let ((def (haskell-ident-at-point)))
3736
(if (and def (symbolp def)) (setq def (symbol-name def)))
38-
(if hayoo? (setq hoogle-or-hayoo "Hayoo"))
3937
(list (read-string (if def
40-
(format "%s query (default %s): " hoogle-or-hayoo def)
41-
(format "%s query: " hoogle-or-hayoo))
38+
(format "Hoogle query (default %s): " def)
39+
"Hoogle query: ")
4240
nil nil def)
4341
)))
4442

@@ -67,7 +65,6 @@ is asked to show extra info for the items matching QUERY.."
6765
:type '(choice
6866
(const :tag "haskell-org" "https://hoogle.haskell.org/?hoogle=%s")
6967
(const :tag "fp-complete" "https://www.stackage.org/lts/hoogle?q=%s")
70-
(const :tag "hayoo" "http://hayoo.fh-wedel.de/?query=%s")
7168
string))
7269

7370
;;;###autoload
@@ -130,25 +127,5 @@ is asked to show extra info for the items matching QUERY.."
130127
(haskell-hoogle-start-server))
131128
(haskell-mode-toggle-interactive-prompt-state t))))
132129

133-
134-
(defcustom haskell-hayoo-url "http://hayoo.fh-wedel.de/?query=%s"
135-
"Default value for hayoo web site."
136-
:group 'haskell
137-
:type '(choice
138-
(const :tag "fh-wedel.de" "http://hayoo.fh-wedel.de/?query=%s")
139-
string))
140-
141-
;;;###autoload
142-
(defun haskell-hayoo (query)
143-
"Do a Hayoo search for QUERY."
144-
(interactive (hoogle-prompt t))
145-
(browse-url (format haskell-hayoo-url (url-hexify-string query))))
146-
147-
;;;###autoload
148-
(defalias 'hayoo 'haskell-hayoo)
149-
150-
151-
152-
153130
(provide 'haskell-hoogle)
154131
;;; haskell-hoogle.el ends here

haskell-load.el

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,6 @@ list of modules where missed IDENT was found."
246246
(haskell-process-suggest-imports session file modules ident)))
247247
(when haskell-process-suggest-haskell-docs-imports
248248
(let ((modules (haskell-process-haskell-docs-ident ident)))
249-
(haskell-process-suggest-imports session file modules ident)))
250-
(when haskell-process-suggest-hayoo-imports
251-
(let ((modules (haskell-process-hayoo-ident ident)))
252249
(haskell-process-suggest-imports session file modules ident)))))
253250
((string-match "^[ ]+It is a member of the hidden package [‘`‛]\\([^@\r\n]+\\).*['’].$" msg)
254251
(when haskell-process-suggest-add-package

0 commit comments

Comments
 (0)