;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@77 Non-nil means some commands were triggered during async function execution. (defvar haskell-utils-async-post-command-flag nil (#$ . 87)) (make-variable-buffer-local 'haskell-utils-async-post-command-flag) #@60 Special variable indicating a state of user input waiting. (defvar haskell-mode-interactive-prompt-state nil (#$ . 298)) #@219 Read directory name and normalize to true absolute path. Refer to `read-directory-name' for the meaning of PROMPT and DEFAULT. If `haskell-process-load-or-reload-prompt' is nil, accept `default'. (fn PROMPT DEFAULT) (defalias 'haskell-utils-read-directory-name #[514 "\300\301\211#!\302\303\304#\305P\207" [file-truename read-directory-name replace-regexp-in-string "/$" "" "/"] 7 (#$ . 426)]) #@287 Return imported module name if on import statement or nil otherwise. This currently assumes that the "import" keyword and the module name are on the same line. This function supports the SafeHaskell and PackageImports syntax extensions. Note: doesn't detect if in {--}-style comment. (defalias 'haskell-utils-parse-import-statement-at-point #[0 "\212\300 b\210\301\302!\205\303\304!)\207" [line-beginning-position looking-at "[ ]*import[ ]+\\(?:safe[ ]+\\)?\\(?:qualified[ ]+\\)?\\(?:\"[^\"]*\"[ ]+\\)?\\([[:digit:][:upper:][:lower:]_.]+\\)" match-string-no-properties 1] 2 (#$ . 832)]) #@182 A special hook which collects triggered commands during async execution. This hook pushes value of variable `this-command' to flag variable `haskell-utils-async-post-command-flag'. (defalias 'haskell-utils-async-update-post-command-flag #[0 "\211 B\211\211\207" [this-command haskell-utils-async-post-command-flag] 4 (#$ . 1435)]) #@298 Watch for triggered commands during async operation execution. Resets flag variable `haskell-utils-async-update-post-command-flag' to NIL. By changes it is assumed that nothing happened, e.g. nothing was inserted in buffer, point was not moved, etc. To collect data `post-command-hook' is used. (defalias 'haskell-utils-async-watch-changes #[0 "\301\302\303\304\301\305$\207" [haskell-utils-async-post-command-flag nil add-hook post-command-hook haskell-utils-async-update-post-command-flag t] 5 (#$ . 1775)]) #@334 Clean up after async operation finished. This function takes care about cleaning up things made by `haskell-utils-async-watch-changes'. The BUFFER argument is a buffer where `post-command-hook' should be disabled. This is necessary, because it is possible that user will change buffer during async function execusion. (fn BUFFER) (defalias 'haskell-utils-async-stop-watching-changes #[257 "r\211q\210\301\302\303\304\305#)\207" [haskell-utils-async-post-command-flag nil remove-hook post-command-hook haskell-utils-async-update-post-command-flag t] 5 (#$ . 2295)]) #@197 Remove newlines and extra whitespace from string STR. If line starts with a sequence of whitespaces, substitutes this sequence with a single whitespace. Removes all newline characters. (fn STR) (defalias 'haskell-utils-reduce-string #[257 "\300\301\302#\300\303\304#\207" [replace-regexp-in-string "^ +" " " " ?\n" ""] 6 (#$ . 2871)]) #@525 Parse response REPL's RESPONSE for errors. Returns one of the following symbols: + unknown-command + option-missing + interactive-error + no-error *Warning*: this funciton covers only three kind of responses: * "unknown command …" REPL missing requested command * ":3:5: …" interactive REPL error * "Couldn't guess that module name. Does it exist?" (:type-at and maybe some other commands error) * *all other reposnses* are treated as success reposneses and 'no-error is returned. (fn RESPONSE) (defalias 'haskell-utils-repl-response-error-status #[257 "\211\203H\301\302\303#@\211\204\304\207\305\306\303\307#)\266\203\203\"\310\207\311\306\303\307#)\266\203\2034\312\207\313\306\303\307#)\266\203\203F\314\207\304\207\304\207" [inhibit-changing-match-data split-string "\n" t no-error "^unknown command" nil string-match unknown-command "^Couldn't guess that module name. Does it exist?" option-missing "^:" interactive-error] 9 (#$ . 3217)]) #@151 Prepare :type-at command to be send to haskell process. POS is a cons cell containing min and max positions, i.e. target expression bounds. (fn POS) (defalias 'haskell-utils-compose-type-at-command #[257 "\212\211@A\300\211\211\211\211b\210\301 \262iT\262b\210\301 \262iT\262\302\"\262\303\304\305#\211A\203@\211@;\203@\306\307@\"\262\210\310\311\312\306\313\314 \n\n\n\n\n&#\266\207)\207" [nil line-number-at-pos buffer-substring-no-properties split-string "\n" t format "[ %s … ]" replace-regexp-in-string "\n$" "" ":type-at %s %d %d %d %d %s" buffer-file-name] 19 (#$ . 4233)]) #@147 Set `haskell-mode-interactive-prompt-state' to t. If given DISABLED argument sets variable value to nil, otherwise to t. (fn &optional DISABLED) (defalias 'haskell-mode-toggle-interactive-prompt-state #[256 "\211?\211\207" [haskell-mode-interactive-prompt-state] 3 (#$ . 4848)]) (provide 'haskell-utils)