;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require ansi-color haskell-mode haskell-utils] 2) #@26 Prompt for Hoogle query. (defalias 'hoogle-prompt #[0 "\300 \211\203\2119\203\301!\262\302\203\303\304\"\202\305\306\211$C\207" [haskell-ident-at-point symbol-name read-string format "Hoogle query (default %s): " "Hoogle query: " nil] 6 (#$ . 191)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\310\315&\207" [custom-declare-variable haskell-hoogle-command funcall function #[0 "\300\301!\205\301\207" [executable-find "hoogle"] 2] "Name of the command to use to query Hoogle.\nCan also be a function that returns the command as a string.\nIf nil, use the Hoogle web-site." :group haskell :type (choice (const :tag "Use Web-site" nil) string function) haskell-hoogle-url #[0 "\300\207" [#1="https://hoogle.haskell.org/?hoogle=%s"] 1 #1#] "Default value for hoogle web site." (choice (const :tag "haskell-org" "https://hoogle.haskell.org/?hoogle=%s") (const :tag "fp-complete" "https://www.stackage.org/lts/hoogle?q=%s") string)] 8) #@182 Do a Hoogle search for QUERY. If prefix argument INFO is given, then `haskell-hoogle-command' is asked to show extra info for the items matching QUERY.. (fn QUERY &optional INFO) (defalias 'haskell-hoogle #[513 "\204 \306\307 \310!\"!\207\311!\203 \202\203!\312\202\"\313\314\315!R\316!\n\317\211\223\210\320 B\321\fB\322 \323\324!\211\317\211rq\210c\210\325ed\")\262rq\210\326\317\"\262)\311\327!\203i\327\"\202j\211)\266\203*\207" [haskell-hoogle-command haskell-hoogle-url help-window-point-marker temp-buffer-window-setup-hook temp-buffer-window-show-hook help-window-old-frame browse-url format url-hexify-string functionp " -i " "" " --color " shell-quote-argument shell-command-to-string nil help-mode-setup help-mode-finish selected-frame temp-buffer-window-setup "*hoogle*" ansi-color-apply-on-region temp-buffer-window-show help-window-setup standard-output] 10 (#$ . 1196) (byte-code "\301\302 \"\207" [current-prefix-arg append hoogle-prompt] 3)]) (defalias 'hoogle 'haskell-hoogle) #@51 Lookup QUERY at `haskell-hoogle-url'. (fn QUERY) (defalias 'haskell-hoogle-lookup-from-website #[257 "\301\302\303!\"!\207" [haskell-hoogle-url browse-url format url-hexify-string] 6 (#$ . 2231) (hoogle-prompt)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\303&\207" [custom-declare-variable haskell-hoogle-server-command funcall function #[0 "\300\207" [#[257 "\300\301\302\303\304!\257\207" ["hoogle" "server" "--local" "-p" number-to-string] 7 "\n\n(fn PORT)"]] 1] "Command used to start the local hoogle server." :group haskell :type] 8) (defvar haskell-hoogle-server-process-name "emacs-local-hoogle") (defvar haskell-hoogle-server-buffer-name (format "*%s*" haskell-hoogle-server-process-name)) #@14 Port number. (defvar haskell-hoogle-port-number 49513 (#$ . 2951)) #@48 The process handle of the local hoogle server. (defvar haskell-hoogle-server-process nil (#$ . 3024)) #@28 Start hoogle local server. (defalias 'haskell-hoogle-start-server #[0 "\305 ?\205\306\307\310\311 !D\n !\"\"\211\207" [haskell-hoogle-server-process-name haskell-hoogle-server-buffer-name haskell-hoogle-server-command haskell-hoogle-port-number haskell-hoogle-server-process haskell-hoogle-server-live-p apply start-process append get-buffer-create] 6 (#$ . 3132) nil]) #@44 Whether the hoogle server process is live. (defalias 'haskell-hoogle-server-live-p #[0 "\3011 \302!0\207\303\207" [haskell-hoogle-server-process (error) process-live-p nil] 2 (#$ . 3512)]) #@39 Kill the hoogle server if it is live. (defalias 'haskell-hoogle-kill-server #[0 "\302 \205\303\304!!\210\305\211\207" [haskell-hoogle-server-buffer-name haskell-hoogle-server-process haskell-hoogle-server-live-p kill-process get-buffer-create nil] 3 (#$ . 3709) nil]) #@38 Lookup QUERY on local hoogle server. (defalias 'haskell-hoogle-lookup-from-local #[0 "\301 \203\302\303\304\305 @#!\207\306 \210\307\216\310\311!\205\312 )\207" [haskell-hoogle-port-number haskell-hoogle-server-live-p browse-url format "http://localhost:%i/?hoogle=%s" hoogle-prompt haskell-mode-toggle-interactive-prompt-state #[0 "\300\301!\207" [haskell-mode-toggle-interactive-prompt-state t] 2] y-or-n-p "Hoogle server not running, start hoogle server? " haskell-hoogle-start-server] 5 (#$ . 3987) nil]) (provide 'haskell-hoogle)