;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\300\312!\210\300\313!\210\300\314!\210\300\315!\210\300\316!\207" [require cl-lib haskell-mode haskell-hoogle haskell-process haskell-debug haskell-interactive-mode haskell-repl haskell-load haskell-commands haskell-modules haskell-string haskell-completions haskell-utils haskell-customize] 2) #@46 Keymap for using `interactive-haskell-mode'. (defvar interactive-haskell-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\317#\210\301\320\321#\210\301\322\323#\210\301\324\325#\210\301\326\325#\210\207" [make-sparse-keymap define-key "\f" haskell-process-load-file "" haskell-process-reload "" haskell-process-do-type " " haskell-process-do-info [134217774] haskell-mode-jump-to-def-or-tag " " haskell-interactive-mode-clear "" haskell-process-cabal-build "" haskell-cabal-visit-file "" haskell-process-cabal "" haskell-interactive-switch ""] 5) (#$ . 512)) #@117 Non-nil if Interactive-Haskell mode is enabled. Use the command `interactive-haskell-mode' to change this variable. (defvar interactive-haskell-mode nil (#$ . 1194)) (make-variable-buffer-local 'interactive-haskell-mode) #@626 Minor mode for enabling haskell-process interaction. This is a minor mode. If called interactively, toggle the `Interactive-Haskell mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `interactive-haskell-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'interactive-haskell-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\311\312\313\305\306$\210\314\315\203B\316\202C\317\"\210\320\321!\203e\302 \203W\211\302 \232\203e\322\323\203a\324\202b\325\326#\210\210\327 \210\207" [interactive-haskell-mode local-minor-modes current-message toggle 1 nil t boundp delq add-hook completion-at-point-functions haskell-completions-sync-repl-completion-at-point run-hooks interactive-haskell-mode-hook interactive-haskell-mode-on-hook interactive-haskell-mode-off-hook called-interactively-p any message "Interactive-Haskell mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 7 (#$ . 1422) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar interactive-haskell-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\313\310\211%\210\314\315\316\317#\207" [interactive-haskell-mode-map interactive-haskell-mode-hook variable-documentation put "Hook run after entering or leaving `interactive-haskell-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode interactive-haskell-mode " Interactive" make-obsolete haskell-process-completions-at-point haskell-completions-sync-repl-completion-at-point "June 19, 2015"] 6) #@69 A `completion-at-point' function using the current haskell process. (defalias 'haskell-process-completions-at-point #[0 "\302 \205\227\303 \304\305\306\307 \"\203!\310\311!\312\224\312\225\313\"E\207\314\315 8\203L\212`\316\317\304\320#\2057\321\322\320#\262)\203L\305\323\307 \"\203L\311\224\311\225E\207\314\315 8\203x\212`\316\317\304\320#\205b\321\324\320#\262)\203x\325\326!\211\262\203x\211@A E\207\327 \211\262\205\225\211\211A\262\242\211\313\330\"\"E\266\202\266\202\207" [haskell-ghc-supported-options haskell-ghc-supported-extensions haskell-session-maybe haskell-process nil looking-back "^import[[:space:]]+\\(?:qualified[[:space:]]+\\)?\\(\\(?:[[:upper:]]['.[:alnum:]]*\\)?\\)" line-beginning-position match-string-no-properties 0 1 haskell-process-get-repl-completions 4 syntax-ppss search-backward "{-#" t search-forward-regexp "\\_" "\\_<-[[:alnum:]-]*" "\\_" bounds-of-thing-at-point symbol haskell-ident-pos-at-point buffer-substring-no-properties] 11 (#$ . 3560)]) #@24 Handle the return key. (defalias 'haskell-interactive-mode-return #[0 "\300 \203\301 \207\302 \203\303 \207\304 \207" [haskell-interactive-at-compile-message next-error-internal haskell-interactive-at-prompt haskell-interactive-handle-expr haskell-interactive-copy-to-prompt] 1 (#$ . 4622) nil]) #@321 Kill the session process and buffer, delete the session. 1. Kill the process. 2. Kill the interactive buffer unless LEAVE-INTERACTIVE-BUFFER is not given. 3. Walk through all the related buffers and set their haskell-session to nil. 4. Remove the session from the sessions list. (fn &optional LEAVE-INTERACTIVE-BUFFER) (defalias 'haskell-session-kill #[256 "\302 \210\303\216\300 \304!\305!\210\204\306\307!!\210\310 \311:\203@@\262r\211q\210\312\300!\2038\304!\230\2038\311)A\262\202\266\313\314\315\" \"\316\317!\266\202)\207" [haskell-session haskell-sessions haskell-mode-toggle-interactive-prompt-state #[0 "\300\301!\207" [haskell-mode-toggle-interactive-prompt-state t] 2] haskell-session-name haskell-kill-session-process kill-buffer haskell-session-interactive-buffer buffer-list nil boundp cl-remove-if make-closure #[257 "\301!\300\230\207" [V0 haskell-session-name] 3 "\n\n(fn SESSION)"] run-hooks haskell-session-kill-hook] 7 (#$ . 4929) nil]) #@42 Kill the buffer and (maybe) the session. (defalias 'haskell-interactive-kill #[0 "\302=\205#\303 \210\304\216\305\301!\203 \203\306\307!\203\310\311!\210)\303\311!\207" [major-mode haskell-session haskell-interactive-mode haskell-mode-toggle-interactive-prompt-state #[0 "\300\207" [nil] 1] boundp y-or-n-p "Kill the whole session? " haskell-session-kill t] 2 (#$ . 5916) nil]) #@48 Make a Haskell session called NAME. (fn NAME) (defalias 'haskell-session-make #[257 "\301!\203 \302\303\"\210\304BC\211\305\306\"\210\307!\210\207" [haskell-session haskell-session-lookup error "Session of name %s already exists!" name add-to-list haskell-sessions haskell-process-start] 5 (#$ . 6308)]) #@147 Prompt to create a new project based on a guess from the nearest Cabal file. If `haskell-process-load-or-reload-prompt' is nil, accept `default'. (defalias 'haskell-session-new-assume-from-cabal #[0 "\301 \302!?\205\303 \210\304\216\203\305\306\307\"!\205\310!)\207" [haskell-process-load-or-reload-prompt haskell-session-default-name haskell-session-lookup haskell-mode-toggle-interactive-prompt-state #[0 "\300\301!\207" [haskell-mode-toggle-interactive-prompt-state t] 2] y-or-n-p format "Start a new project named ā€œ%sā€? " haskell-session-make] 5 (#$ . 6627)]) #@61 Get the Haskell session, prompt if there isn't one or fail. (defalias 'haskell-session #[0 "\300 \206\301\302 \206\303 \206\304 \206\305 !\207" [haskell-session-maybe haskell-session-assign haskell-session-from-buffer haskell-session-new-assume-from-cabal haskell-session-choose haskell-session-new] 2 (#$ . 7211)]) #@50 Switch to the interactive mode for this session. (defalias 'haskell-interactive-switch #[0 "p\301\302 !r\211q\210)\211\303 =?\205\304!\207" [haskell-interactive-previous-buffer haskell-session-interactive-buffer haskell-session window-buffer switch-to-buffer-other-window] 4 (#$ . 7541) nil]) #@21 Make a new session. (defalias 'haskell-session-new #[0 "\300\301\302 \"\211\303\230?\205,\304!\305 \210\306\216\211\203\"\307\310\311\"!\210\202&\312!\210)\305\313!\262\207" [read-from-minibuffer "Project name: " haskell-session-default-name "" haskell-session-lookup haskell-mode-toggle-interactive-prompt-state #[0 "\300\207" [nil] 1] y-or-n-p format "Session %s already exists. Use it?" haskell-session-make t] 6 (#$ . 7845)]) #@44 Change the session for the current buffer. (defalias 'haskell-session-change #[0 "\300\301 \206 \302 \206 \303 !\207" [haskell-session-assign haskell-session-new-assume-from-cabal haskell-session-choose haskell-session-new] 2 (#$ . 8288) nil]) #@51 Prompt to restart the died PROCESS. (fn PROCESS) (defalias 'haskell-process-prompt-restart #[257 "\303!\304 \203\254\305 \210\306\216\307\310\311!\"\203i\312\313\314\315\316\317#\320\314\311!\316\321#R\322\"\211\323\267\202c\324\325!!\326\327\330\315!\")\202d\311!\331\332!\211\203R\333!\266\202\202d\333\334\332!!\210c\266\202\202d\335\202d\335\262\202\250\312\314\336\337\"\316\340#\341\"\211\342\267\202\245\343\325!!\202\246\311!\331\332!\211\203\224\333!\266\202\202\246\333\334\332!!\210c\266\202\202\246\335\202\246\335\262)\202\260\326\344\")\207" [cursor-in-echo-area haskell-process-suggest-restart default-directory haskell-process-name t haskell-mode-toggle-interactive-prompt-state #[0 "\300\301!\207" [haskell-mode-toggle-interactive-prompt-state t] 2] string-match "You need to re-run the 'configure' command." haskell-process-response read-char-choice "The Haskell process ended. Cabal wants you to run " propertize "cabal configure" face font-lock-keyword-face " because there is a version mismatch. Re-configure (y, n, l: view log)?\n\nCabal said:\n\n" font-lock-comment-face (108 110 121) #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (121 48 108 64 110 95)) haskell-session-cabal-dir haskell-process-session message "%s" shell-command-to-string get-buffer "*haskell-process-log*" switch-to-buffer get-buffer-create nil format "The Haskell process `%s' has died. Restart? (y, n, l: show process log) " minibuffer-prompt (108 110 121) #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (121 122 108 130 110 161)) haskell-process-start "The Haskell process `%s' is dearly departed."] 10 (#$ . 8540)]) #@51 Get the current process from the current session. (defalias 'haskell-process #[0 "\300\301 !\207" [haskell-session-process haskell-session] 2 (#$ . 10272)]) #@43 Kill the process. (fn &optional SESSION) (defalias 'haskell-kill-session-process #[256 "\211\206\300 \301\302!!\303!\205!\304\305\"\210\306\307!\310\311#\210\312!\207" [haskell-session get-process haskell-session-name processp haskell-interactive-mode-echo "Killing process ..." haskell-process-set haskell-session-process is-restarting t delete-process] 7 (#$ . 10435) nil]) #@58 Visit the buffer of the current (or last) error message. (defalias 'haskell-interactive-mode-visit-error #[0 "r\301\302 !q\210\303 b\210\304!\203\305y\210\306 \202!db\210\307 \210\306 )\207" [haskell-interactive-mode-error-regexp haskell-session-interactive-buffer haskell-session line-beginning-position looking-at -1 haskell-interactive-jump-to-error-line haskell-interactive-mode-error-backward] 2 (#$ . 10826) nil]) (defvar xref-prompt-for-identifier nil) #@173 Jump to the tag of the given identifier. Give optional NEXT-P parameter to override value of `xref-prompt-for-identifier' during definition search. (fn &optional NEXT-P) (defalias 'haskell-mode-jump-to-tag #[256 "\303\304 !\305 \306\2050\307!\310\230?\2050\211\2050\211\311P\312 !\203,\313!)\202/\314!))\207" [tags-revert-without-query tags-file-name xref-prompt-for-identifier haskell-string-drop-qualifier haskell-ident-at-point haskell-cabal--find-tags-dir t haskell-string-trim "" "TAGS" file-exists-p xref-find-definitions haskell-mode-generate-tags] 5 (#$ . 11297) "P"]) #@53 Function that will be called after buffer's saving. (defalias 'haskell-mode-after-save-handler #[0 "\205\3011\f\302 0\207\210\303\207" [haskell-tags-on-save (error) haskell-mode-generate-tags nil] 1 (#$ . 11895)]) #@84 The tag find function, specific for the particular session. (fn &optional NEXT-P) (defalias 'haskell-mode-tag-find #[256 "\300 \301\234\203\n\302 \207\303\304!\207" [syntax-ppss 3 haskell-mode-jump-to-filename-in-string call-interactively haskell-mode-jump-to-tag] 3 (#$ . 12119) "P"]) #@45 Jump to the filename in the current string. (defalias 'haskell-mode-jump-to-filename-in-string #[0 "\212\300\301\302\303 \304\305$T\305u\210\306\302\307 \304\305$S\")\310\311\312 !\"\313\314\315\211#!\207" [buffer-substring-no-properties search-backward-regexp "\"" line-beginning-position nil 1 search-forward-regexp line-end-position expand-file-name haskell-session-cabal-dir haskell-session find-file read-file-name ""] 7 (#$ . 12413)]) #@49 Bring up the interactive mode for this session. (defalias 'haskell-interactive-bring #[0 "\300 \301!\302!\207" [haskell-session haskell-session-interactive-buffer pop-to-buffer] 4 (#$ . 12862) nil]) #@31 Load the current buffer file. (defalias 'haskell-process-load-file #[0 "\300 \210\301\302 !\210\303\304\305\306\307\310\311 #\"\312p#\207" [save-buffer haskell-interactive-mode-reset-error haskell-session haskell-process-file-loadish format "load \"%s\"" replace-regexp-in-string "\"" "\\\\\"" buffer-file-name nil] 7 (#$ . 13069) nil]) #@34 Re-load the current buffer file. (defalias 'haskell-process-reload #[0 "\300 \210\301\302 !\210\303\304\305p#\207" [save-buffer haskell-interactive-mode-reset-error haskell-session haskell-process-file-loadish "reload" t] 4 (#$ . 13412) nil]) (defalias 'haskell-process-reload-file #[0 "\300 \207" [haskell-process-reload] 1]) (make-obsolete 'haskell-process-reload-file 'haskell-process-reload "2015-11-14") #@74 Load or reload. Universal argument toggles which. (fn &optional TOGGLE) (defalias 'haskell-process-load-or-reload #[256 "\211\203?\301\302\203\303\202\304\"\207\203\305 \207\306 \207" [haskell-reload-p message "%s (No action taken this time)" "Now running :reload." "Now running :load ." haskell-process-reload haskell-process-load-file] 4 (#$ . 13827) "P"]) (make-obsolete 'haskell-process-load-or-reload 'haskell-process-load-file "2015-11-14") #@26 Build the Cabal project. (defalias 'haskell-process-cabal-build #[0 "\300\301!\210\302 \207" [haskell-process-do-cabal "build" haskell-process-add-cabal-autogen] 2 (#$ . 14310) nil]) #@45 Prompts for a Cabal command to run. (fn P) (defalias 'haskell-process-cabal #[257 "\211\203\n\302\303\304!!\207\302\305\306 \307C\"\"!\207" [haskell-completing-read-function haskell-cabal-commands haskell-process-do-cabal read-from-minibuffer "Cabal command (e.g. install): " "Cabal command: " append "build --ghc-options=-fforce-recomp"] 7 (#$ . 14499) "P"]) #@263 Run a loading-ish COMMAND that wants to pick up type errorsand things like that. RELOAD-P indicates whether the notification should say 'reloaded' or 'loaded'. MODULE-BUFFER may be used for various things, but is optional. (fn COMMAND RELOAD-P MODULE-BUFFER) (defalias 'haskell-process-file-loadish #[771 "\301 \302!\210\203\303!\210\304 \305\306\307\n\n\n\257\310\311\312%\"\207" [haskell-process-check-cabal-config-on-load haskell-session haskell-session-current-dir haskell-process-look-config-changes haskell-process haskell-process-queue-command record haskell-command #[257 "\300A@\301\302AA@\"\"\207" [haskell-process-send-string format ":%s"] 6 "\n\n(fn STATE)"] #[514 "\300A@\301#\207" [haskell-process-live-build nil] 6 "\n\n(fn STATE BUFFER)"] #[514 "\300@A@AAA@AAAA@%\207" [haskell-process-load-complete] 8 "\n\n(fn STATE RESPONSE)"]] 14 (#$ . 14869)]) #@23 Dump minimal imports. (defalias 'haskell-process-minimal-imports #[0 "\212eb\210\300 \210`)`V\204eb\210\300 \210\301\302 \303\"\210\304 \210\305\306\307 !\310\311\312 !\313R!\207" [haskell-navigate-imports-go haskell-process-queue-sync-request haskell-process ":set -ddump-minimal-imports" haskell-process-load-file insert-file-contents-literally haskell-session-current-dir haskell-session "/" haskell-guess-module-name-from-file-name buffer-file-name ".imports"] 5 (#$ . 15765) nil]) #@25 Jump to the error line. (defalias 'haskell-interactive-jump-to-error-line #[0 "\300\301 \302 \"\303\304\"\205h\305\306\"\305\307\"\305\310\"\311 \312!\313!\314\"\314\"\315!\2035\202<\315!\205<\211\211\205d\316\306!\210\317!\210\320 \210eb\210\321!Sy\210`\321!\\Sb\210\322\n!\210\323\262\266\210\207" [buffer-substring-no-properties line-beginning-position line-end-position string-match "^\\([^:]+\\):\\([0-9]+\\):\\([0-9]+\\)\\(-[0-9]+\\)?:" match-string 1 2 3 haskell-interactive-session haskell-session-cabal-dir haskell-session-current-dir expand-file-name file-exists-p other-window find-file haskell-interactive-bring string-to-number haskell-mode-message-line t] 13 (#$ . 16259)]) (provide 'haskell)