;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\312\313\314\315\316\317\320\321\320\322\323\324& \210\325\326\327\330\331DD\332\333\334%\207" [require comint shell etags compile haskell-decl-scan haskell-cabal haskell-customize cl-lib haskell-string custom-declare-group inferior-haskell nil "Settings for REPL interaction via `inferior-haskell-mode'" :link (custom-manual "(haskell-mode)inferior-haskell-mode") :prefix "inferior-haskell-" "haskell-" :group haskell custom-declare-variable inferior-haskell-hook funcall function #[0 "\300\207" [nil] 1] "The hook that is called after starting inf-haskell." :type hook] 12) #@91 Return the command with the arguments to start the repl based on the directory structure. (defalias 'haskell-program-name-with-args #[0 "\306 \211\307\267\202.\310=\203\311 B\207\312\n<\203\n\202\nC \"\207 \313\fBB\207 \314BB\207\315\316\317#\2057\320\207" [system-type haskell-process-args-ghci haskell-process-path-ghci haskell-process-path-cabal haskell-process-args-cabal-repl haskell-process-path-stack haskell-process-type #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (quote 8 ghci 8 cabal-repl 33 stack-ghci 39)) cygwin "ghcii.sh" append "repl" "ghci" error "cl-ecase failed: %s, %s" (ghci quote cabal-repl quote stack-ghci quote) nil haskell-process-args-stack-ghci] 5 (#$ . 792)]) (defconst inferior-haskell-info-xref-re "-- Defined at \\(.+\\):\\([0-9]+\\):\\([0-9]+\\)\\(?:-\\([0-9]+\\)\\)?$") #@56 Regular expression for matching module names in :info. (defconst inferior-haskell-module-re "-- Defined in \\(.+\\)$" (#$ . 1655)) #@85 Regular expression for matching multiline prompt (the one inside :{ ... :} blocks). (defvar inferior-haskell-multiline-prompt-re "^\\*?[[:upper:]][\\._[:alnum:]]*\\(?: \\*?[[:upper:]][\\._[:alnum:]]*\\)*| " (#$ . 1792)) #@140 Regexps for error messages generated by inferior Haskell processes. The format should be the same as for `compilation-error-regexp-alist'. (defconst inferior-haskell-error-regexp-alist (byte-code "\301\302\303\304\305\306!\205 \307BBBB\310\302\305\306!\203\311\202\312BB\313\302\303\305\306!\203+\314\202,\315F\305\306!\205:\316\317\320\321BFBBB\207" [inferior-haskell-info-xref-re "^\\(.+?\\):\\([0-9]+\\):\\(\\([0-9]+\\):\\)?\\( \\|\n *\\)\\([Ww]arning\\)?" 1 2 4 fboundp compilation-fake-loc ((6) nil (5 '(face nil font-lock-multiline t))) "^\\*\\*\\* Exception: \\(.+?\\):(\\([0-9]+\\),\\([0-9]+\\))-(\\([0-9]+\\),\\([0-9]+\\)): .*" ((2 . 4) (3 . 5)) (2 3) "^\\*\\*\\* Exception: \\(.+?\\):\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\): .*" (3 . 4) 3 ("^[ ]+at \\(.+\\):\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\)$" 1 2 (3 . 4) 0) ("[ (]defined at \\(.+\\):\\([0-9]+\\):\\([0-9]+\\))?$" 1 2 3 0) ("imported from .* at \\(.+\\):\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\)$" 1 2 (3 . 4) 0) (1 2 (3 . 4) 0)] 8) (#$ . 2019)) #@130 Ignore everything before the first '> '. This allows us to correctly interpret multi-line input even when modules are imported. (defconst haskell-prompt-regexp "^[[:alnum:].*_() |λ]*> " (#$ . 3044)) (defvaralias 'inferior-haskell-mode-map 'inf-haskell-map) (defvar inf-haskell-map (byte-code "\300 \301\302\303#\210\207" [make-sparse-keymap define-key "" comint-kill-subjob] 5)) (defvar inferior-haskell-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [inferior-haskell-mode-hook variable-documentation put "Hook run after entering Inf-Haskell mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp inferior-haskell-mode-map definition-name inferior-haskell-mode] 4) (defvar inferior-haskell-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\210\303\311\323\324#\207" [inferior-haskell-mode-abbrev-table inferior-haskell-mode-map variable-documentation put purecopy "Keymap for `inferior-haskell-mode'." boundp inferior-haskell-mode-syntax-table definition-name inferior-haskell-mode (lambda (#1=#:def-tmp-var) (defvar inferior-haskell-mode-syntax-table #1#)) make-syntax-table "Syntax table for `inferior-haskell-mode'." (lambda (#1#) (defvar inferior-haskell-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `inferior-haskell-mode'." derived-mode-parent comint-mode custom-mode-group inferior-haskell] 5) #@274 Major mode for interacting with an inferior Haskell process. In addition to any hooks its parent mode `comint-mode' might have run, this mode runs the hook `inferior-haskell-mode-hook', as the final or penultimate step during initialization. \{inferior-haskell-mode-map} (defalias 'inferior-haskell-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2035\211\321 =\203;\322\f\323 \"\210\210\324 \325\"\204R 9=\204R\326 \3259C#\210\327 !\210\330\f!\210 9\306\331!\210:\306\332!\210:\306\333!\210\334\306\335!\210\307\306\336!\210\337\3401\216\341\342!0\210\202\235\210\306\343!\210\307#\344\345\346\334\347$\210\306\350!\210;(\306\351!\210\352)\353\354!\204\277\355\356!\203\277\356\342!\210\202\346\357\342!\210\360 \361\211\203\335\211@\362\363<\"#\210A\266\202\202\306\210\364\354\357B\"\266\344\365\366\"\210)\367\370!\207" [delay-mode-hooks major-mode mode-name inferior-haskell-mode-map inferior-haskell-mode-syntax-table inferior-haskell-mode-abbrev-table make-local-variable t comint-mode inferior-haskell-mode "Inf-Haskell" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table comint-prompt-regexp paragraph-start comint-input-autoexpand nil comint-prompt-read-only shell-cd-regexp ":cd" (error) shell-dirtrack-mode 1 shell-dirtrackp add-hook comint-input-filter-functions shell-directory-tracker local compilation-error-regexp-alist compilation-first-column 0 boundp minor-mode-overriding-map-alist fboundp compilation-shell-minor-mode compilation-minor-mode make-sparse-keymap ([menu-bar] [follow-link]) define-key lookup-key add-to-list inferior-haskell-hook inferior-haskell-init run-mode-hooks inferior-haskell-mode-hook local-abbrev-table haskell-prompt-regexp inferior-haskell-error-regexp-alist compilation-minor-mode-map] 9 (#$ . 4776) nil]) #@54 The buffer in which the inferior process is running. (defvar inferior-haskell-buffer nil (#$ . 6818)) #@265 Start an inferior haskell process. With universal prefix \[universal-argument], prompts for a COMMAND, otherwise uses `haskell-program-name-with-args'. It runs the hook `inferior-haskell-hook' after starting the process and setting up the inferior-haskell buffer. (defalias 'inferior-haskell-start-process #[0 "\303 \203\304\305\306@\307A%r\nq\210\310 \210\311\312!)\207" [inferior-haskell-root-dir default-directory inferior-haskell-buffer haskell-program-name-with-args apply make-comint "haskell" nil inferior-haskell-mode run-hooks inferior-haskell-hook] 7 (#$ . 6927)]) #@25 Restart if not present. (defalias 'inferior-haskell-process #[0 "\301!\203\302!\203\303!\207\304 \210\305 \207" [inferior-haskell-buffer buffer-live-p comint-check-proc get-buffer-process inferior-haskell-start-process inferior-haskell-process] 2 (#$ . 7516)]) #@65 Show the inferior-haskell buffer. Start the process if needed. (defalias 'run-haskell #[0 "\300 \301\302!!\207" [inferior-haskell-process pop-to-buffer-same-window process-buffer] 4 (#$ . 7790) nil]) (defvar inferior-haskell-result-history nil) #@122 This is a temporary variable to store the intermediate results while `accecpt-process-output' with `haskell-extract-exp' (defvar haskell-next-input "" (#$ . 8044)) #@12 (fn STR) (defalias 'haskell-extract-exp #[257 "P\303\304\305\"r\211q\210\306\307\"\216c\210\310 \311\305\312$*\262\203D\313\303\304\305\"r\211q\210\306\314\"\216c\210\310 \311\305\312$*\262SO\nB\315\211\207\315\207" [haskell-next-input haskell-prompt-regexp inferior-haskell-result-history generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] re-search-backward nil 1 0 #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] ""] 9 (#$ . 8214)]) #@13 (fn STRG) (defalias 'inferior-haskell-no-result-return #[257 "\303 \3041 \305\306\301\307\"\210\310\"\210\311!\210\312\313!\210\305\211)0\207\210\314\315\316!\207" [inhibit-quit comint-preoutput-filter-functions quit-flag inferior-haskell-process (quit) nil add-to-list #[257 "\300!\207" [haskell-extract-exp] 3 "\n\n(fn OUTPUT)"] process-send-string accept-process-output sit-for 0.1 t eval (ignore nil)] 5 (#$ . 8751)]) #@78 Submit the expression `inf-expr' to ghci and read the result. (fn INF-EXPR) (defalias 'inferior-haskell-get-result #[257 "\301\302\303P!\210\211\304V\203 @;\204 \211S\262\302\303P!\210\202\305@!\207" [inferior-haskell-result-history 5 inferior-haskell-no-result-return "\n" 0 haskell-string-chomp] 5 (#$ . 9189)]) #@63 The first thing run while initalizing inferior-haskell-buffer (defalias 'inferior-haskell-init #[0 "\3031\304r q\210\305\306 \307\"\210\310\306 !\210\311\312!*0\207\210\313\314\315!\207" [inhibit-quit inferior-haskell-buffer quit-flag (quit) nil process-send-string inferior-haskell-process "\n" accept-process-output sit-for 0.1 t eval (ignore nil)] 3 (#$ . 9519)]) #@25 t if `:set +c` else nil (defvar haskell-set+c-p nil (#$ . 9896)) #@34 set `:set +c` is not already set (defalias 'haskell-set+c #[0 "?\205\301\302!\207" [haskell-set+c-p inferior-haskell-get-result ":set +c"] 2 (#$ . 9967)]) (provide 'inf-haskell)