;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!\207" [require cl-lib haskell-mode haskell-process haskell-interactive-mode haskell-modules haskell-commands haskell-session haskell-string] 2) #@121 Check whether a cabal configuration file has changed. Restarts the SESSION's process if that is the case. (fn SESSION) (defalias 'haskell-process-look-config-changes #[257 "\301\302\"\303\301\304\"!\230?\2057\305\306\307\"\"\210\310\301\304\"\"\210\311 \210\312\216\205.\313\314!??\2056\315\316 !)\207" [haskell-process-prompt-restart-on-cabal-change haskell-session-get cabal-checksum haskell-cabal-compute-checksum cabal-dir haskell-interactive-mode-echo format "Cabal file changed: %s" haskell-session-set-cabal-checksum haskell-mode-toggle-interactive-prompt-state #[0 "\300\301!\207" [haskell-mode-toggle-interactive-prompt-state t] 2] y-or-n-p "Cabal file changed. Restart GHCi process? " haskell-process-start haskell-interactive-session] 8 (#$ . 344)]) #@72 Show live updates for loading files. (fn PROCESS BUFFER ECHO-IN-REPL) (defalias 'haskell-process-live-build #[771 "\300\301\"\203\302\303$\210\304\207\300\305\"\203 \302\304$\210\304\207\300\306\"\2034\307\310\311\312\313\"\"!\210\304\207\300\314\"\203M\310\315\312\313\"\"\316\317!\"\210\307!\207\300\320\"\203f\310\321\312\313\"\"\316\317!\"\210\307!\207\300\322\"\203\310\323\312\313\"\"\316\317!\"\210\307!\207\324\325\326!\327!#\205\224\307\312\330\"!\210\303\207" [haskell-process-consume "\\[[ ]*\\([0-9]+\\) of \\([0-9]+\\)\\] Compiling \\([^ ]+\\)[ ]+( \\([^ ]+\\), \\([^ ]+\\) )[^ \n]*[ \n]+" haskell-process-echo-load-message nil t "\\[[ ]*\\([0-9]+\\) of \\([0-9]+\\)\\] Compiling \\[TH\\] \\([^ ]+\\)[ ]+( \\([^ ]+\\), \\([^ ]+\\) )[^ \n]*[ \n]+" "Loading package \\([^ ]+\\) ... linking ... done.\n" haskell-mode-message-line format "Loading: %s" match-string 1 "^Preprocessing executables for \\(.+?\\)\\.\\.\\." "Preprocessing: %s" haskell-interactive-mode-echo haskell-process-session "Linking \\(.+?\\) \\.\\.\\." "Linking: %s" "\nBuilding \\(.+?\\)\\.\\.\\." "Building: %s" string-match "Collecting type info for [[:digit:]]+ module(s) \\.\\.\\." haskell-process-response haskell-process-response-cursor 0] 9 (#$ . 1124)]) #@236 Handle the complete loading response. BUFFER is the string of text being sent over the process pipe. MODULE-BUFFER is the actual Emacs buffer of the module being loaded. (fn SESSION PROCESS BUFFER RELOAD MODULE-BUFFER &optional CONT) (defalias 'haskell-process-load-complete #[1541 "\301\302\303\304 !\"!\203r\305!q\210\306 \210)\307\310\"\203\"\311\202i\307\312\"\203-\311\202i\307\313\"\2038\314\202i\307\315\"\203C\314\202i\307\316\"\203N\311\202i\307\317\"\203Y\314\202i\307\320\"\203d\314\202i\321\322\323!!\324!\325!\326\327 \326\"\210\330!\210\331   $\203\220\211T\262\202|\327 \"\210\204\251\203\251\300 \"\210\202\260\332 @\"\210\203\304\333\203\276\334\202\277\335!\210\202\312\336\n\337\"\210\205\345\3401\342\3411\334!00\2070\322\342\"\207\314\262\207" [haskell-process-reload-with-fbytecode get-buffer format "*%s:splices*" haskell-session-name haskell-interactive-mode-splices-buffer erase-buffer haskell-process-consume "Ok, \\(?:[0-9]+\\) modules? loaded\\.$" t "Ok, \\(?:[a-z]+\\) modules? loaded\\.$" "Failed, \\(?:[0-9]+\\) modules? loaded\\.$" nil "Failed, \\(?:[a-z]+\\) modules? loaded\\.$" "Ok, modules loaded: \\(.+\\)\\.$" "Failed, modules loaded: \\(.+\\)\\.$" "Failed, no modules loaded\\.$" error message "Unexpected response from haskell process." haskell-process-extract-modules haskell-process-response-cursor 0 haskell-process-set-response-cursor haskell-check-remove-overlays haskell-process-errors-warnings haskell-process-import-modules haskell-mode-message-line "Reloaded OK." "OK." haskell-interactive-mode-compile-error "Compilation failed." (debug quit) (debug error) "%S"] 15 (#$ . 2413)]) #@180 Suggest add missed imports to file. Asks user to add to SESSION's FILE missed import. MODULES is a list of modules where missed IDENT was found. (fn SESSION FILE MODULES IDENT) (defalias 'haskell-process-suggest-imports #[1028 "\300 \210\301\216\302!\303!G\304V\203\"\305\306\307\"!\205G\310\311\"\202GG\304U\205G@\211\235?\205E\312B\"\210\305\306\313#!\205E\211\262\211\205U\314\"\210\315!\266\203)\207" [haskell-mode-toggle-interactive-prompt-state #[0 "\300\301!\207" [haskell-mode-toggle-interactive-prompt-state t] 2] haskell-session-process haskell-process-suggested-imports 1 y-or-n-p format "Identifier `%s' not in scope, choose module to import?" haskell-complete-module-read "Module: " haskell-process-set-suggested-imports "Identifier `%s' not in scope, import `%s'?" haskell-process-find-file haskell-add-import] 12 (#$ . 4120)]) #@81 Trigger prompting to add any extension suggestions. (fn SESSION MSG FILE LINE) (defalias 'haskell-process-trigger-suggestions #[1028 "\306\307\310\"\203\307\311\"?\2068\307\312\"\2068\307\313\"\2068\307\314\"\2068\307\315\"\2068\307\316\"\2068\307\317\")\203K \205\332\320\321\322\323\"$\207\307\324\"\203a\n\205\332\325\322\326\"$\207\307\327\"\203s \205\332\320\330\331$\207\307\332\"\204\201\307\333\"\203\214\f\205\332\320\321\334$\207\307\335\"\203\312\322\323\"\307\336\"\203\245\322\323\"\202\246\211 \203\267\337!\340$\266$\205\311\341!\340$\262\207\307\342\"\205\332#\205\332\343\"\207" [case-fold-search haskell-process-suggest-language-pragmas haskell-process-suggest-remove-import-lines haskell-process-suggest-no-warn-orphans haskell-process-suggest-overloaded-strings haskell-process-suggest-hoogle-imports nil string-match " -X\\([A-Z][A-Za-z]+\\)" "\\([A-Z][A-Za-z]+\\) is deprecated" "Use \\([A-Z][A-Za-z]+\\) to permit this" "Use \\([A-Z][A-Za-z]+\\) to allow" "Use \\([A-Z][A-Za-z]+\\) to enable" "Use \\([A-Z][A-Za-z]+\\) if you want to disable this" "use \\([A-Z][A-Za-z]+\\)" "You need \\([A-Z][A-Za-z]+\\)" haskell-process-suggest-pragma "LANGUAGE" match-string 1 " The \\(qualified \\)?import of[ ][‘`‛]\\([^ ]+\\)['’] is redundant" haskell-process-suggest-remove-import 2 "[Ww]arning: orphan instance: " "OPTIONS" "-fno-warn-orphans" "against inferred type [‘`‛]\\[Char\\]['’]" "with actual type [‘`‛]\\[Char\\]['’]" "OverloadedStrings" "^Not in scope: .*[‘`‛]\\(.+\\)['’]$" "^[A-Za-z0-9_'.]+\\.\\(.+\\)$" haskell-process-hoogle-ident haskell-process-suggest-imports haskell-process-haskell-docs-ident "^[ ]+It is a member of the hidden package [‘`‛]\\([^@ \n]+\\).*['’].$" haskell-process-suggest-add-package haskell-process-suggest-haskell-docs-imports] 12 (#$ . 4997)]) #@36 Run a Cabal command. (fn COMMAND) (defalias 'haskell-process-do-cabal #[257 "\3021\n\303 0\202\f\210\304\211\304=\204 \305!\306!\307=?\262\2036\310\311!\210\312\313P\314\315!\314\315!#\210\316\317\315!!\207\320 \211\321\267\202J\202S\202S \202S\322\323\324#\205S\304\262\325\326\327\330 \331F\332\333\334\"\335\336\337\333\340\f\"&\"\207" [haskell-process-path-cabal haskell-process-path-stack (error) haskell-interactive-process nil haskell-process-process process-status run message "Process is not running, so running directly." shell-command "cabal " get-buffer-create "*haskell-process-log*" switch-to-buffer-other-window get-buffer haskell-process-type #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (quote 62 ghci 62 cabal-repl 66 stack-ghci 70)) error "cl-ecase failed: %s, %s" (ghci quote cabal-repl quote stack-ghci quote) haskell-process-queue-command make-haskell-command :state haskell-interactive-session 0 :go make-closure #[257 "\302A@\303 \304@!\303\305\300AA@##\"\207" [V0 haskell-process-do-cabal-format-string haskell-process-send-string format haskell-session-cabal-dir "%s %s"] 10 "\n\n(fn STATE)"] :live #[514 "\300\301\302AA@#\211\303\230\204\211\304\230\203\305A@\306#\207\307\"\207" [replace-regexp-in-string "^\\([a-z]+\\).*" "\\1" "build" "install" haskell-process-live-build t haskell-process-cabal-live] 7 "\n\n(fn STATE BUFFER)"] :complete #[514 "A@\303!\304\305!\306\304\"\210\307\310$\203!T\262\202\306\"\210\311\312AA@#\313\"\210\304U\203E\313\314\"\210\313\"\210\315!\210 \205e\316\317!\205e\317\320\311\321\322 @!\"\323\324\300\325\n&\207" [V0 haskell-notify-p haskell-process-logo haskell-process-session 0 haskell-process-response-cursor haskell-process-set-response-cursor haskell-process-errors-warnings nil format "Complete: cabal %s (%s compiler messages)" haskell-interactive-mode-echo "No compiler messages, dumping complete output:" haskell-mode-message-line fboundp notifications-notify :title "*%s*" haskell-session-name :body :app-name :app-icon] 16 "\n\n(fn STATE RESPONSE)"]] 16 (#$ . 6907)]) #@59 Echo a load message. (fn PROCESS BUFFER ECHO-IN-REPL TH) (defalias 'haskell-process-echo-load-message #[1028 "\300!\301\302\"\301\303\"\304\305\306\"  &\207" [haskell-process-session match-string 3 4 haskell-interactive-show-load-message compiling haskell-session-strip-dir] 14 (#$ . 9067)]) #@59 Extract the modules from the process buffer. (fn BUFFER) (defalias 'haskell-process-extract-modules #[257 "\300\301\"\211\205\f\302\303\"\211B\207" [match-string 1 split-string ", "] 5 (#$ . 9379)]) (byte-code "\300\301\302\303\304\305%\210\300\306\307\310\304\305%\210\300\311\312\313\304\305%\207" [custom-declare-face haskell-error-face ((((supports :underline (:style wave))) :underline (:style wave :color "#dc322f")) (t :inherit error)) "Face used for marking error lines." :group haskell-mode haskell-warning-face ((((supports :underline (:style wave))) :underline (:style wave :color "#b58900")) (t :inherit warning)) "Face used for marking warning lines." haskell-hole-face ((((supports :underline (:style wave))) :underline (:style wave :color "#6c71c4")) (t :inherit warning)) "Face used for marking hole lines."] 6) (defvar haskell-check-error-fringe (propertize "!" 'display '(left-fringe exclamation-mark))) (defvar haskell-check-warning-fringe (propertize "?" 'display '(left-fringe question-mark))) (defvar haskell-check-hole-fringe (propertize "_" 'display '(left-fringe horizontal-bar))) #@12 (fn OVL) (defalias 'haskell-check-overlay-p #[257 "\300\301\"\207" [overlay-get haskell-check] 4 (#$ . 10496)]) #@11 (fn XS) (defalias 'haskell-check-filter-overlays #[257 "\300\301\"\207" [cl-remove-if-not haskell-check-overlay-p] 4 (#$ . 10617)]) #@15 (fn BUFFER) (defalias 'haskell-check-remove-overlays #[257 "r\211q\210\300ed\301\302$)\207" [remove-overlays haskell-check t] 6 (#$ . 10758)]) #@140 Evaluate BODY with names in PROPLIST bound to the values of correspondingly-named overlay properties of OVL. (fn PROPLIST OVL &rest BODY) (defalias 'haskell-with-overlay-properties '(macro . #[642 "\300\301!\302D\303\304\305\"\"BBB\207" [cl-gensym "OVL-" let* mapcar make-closure #[257 "\211\301\300\302DED\207" [V0 overlay-get quote] 6 "\n\n(fn P)"]] 10 (#$ . 10910)])) #@14 (fn O1 O2) (defalias 'haskell-overlay-start> #[514 "\300!\300!V\207" [overlay-start] 5 (#$ . 11295)]) #@14 (fn O1 O2) (defalias 'haskell-overlay-start< #[514 "\300!\300!W\207" [overlay-start] 5 (#$ . 11407)]) #@21 (fn TEST BEG END) (defalias 'haskell-first-overlay-in-if #[771 "\300\301\"\"\302\303!\304\"@\207" [cl-remove-if-not overlays-in sort cl-copy-list haskell-overlay-start<] 8 (#$ . 11519)]) #@21 (fn TEST BEG END) (defalias 'haskell-last-overlay-in-if #[771 "\300\301\"\"\302\303!\304\"@\207" [cl-remove-if-not overlays-in sort cl-copy-list haskell-overlay-start>] 8 (#$ . 11718)]) #@12 (fn OVL) (defalias 'haskell-error-overlay-briefly #[257 "\211\300\301\"\300\302\"\211\303=\204\207\304\305\"\203\306\307\"\207\310\311\"\207" [overlay-get haskell-msg haskell-msg-type warning string-prefix-p "[Ww]arning:\n " cl-subseq 13 error "Invariant failed: a warning message from GHC has unexpected form: %s."] 7 (#$ . 11916)]) #@12 (fn OVL) (defalias 'haskell-goto-error-overlay #[257 "\211\203\300!b\210\301\302!!\207\303\304!\207" [overlay-start haskell-mode-message-line haskell-error-overlay-briefly message "No further notes from Haskell compiler."] 4 (#$ . 12271)]) (defalias 'haskell-goto-first-error #[0 "\300\301\302\303\304!\303\305!#!\207" [haskell-goto-error-overlay haskell-first-overlay-in-if haskell-check-overlay-p buffer-end 0 1] 6 nil nil]) (defalias 'haskell-goto-prev-error #[0 "\300\301\302`!!@\303\304e\203\305!\202`#\206\211\262!\207" [haskell-goto-error-overlay haskell-check-filter-overlays overlays-at haskell-last-overlay-in-if haskell-check-overlay-p overlay-start] 7 nil nil]) (defalias 'haskell-goto-next-error #[0 "\300\301\302`!!@\303\304\203\305!\202`d#\206\211\262!\207" [haskell-goto-error-overlay haskell-check-filter-overlays overlays-at haskell-first-overlay-in-if haskell-check-overlay-p overlay-end] 6 nil nil]) #@67 (fn BUFFER ERROR-FROM-THIS-FILE-P LINE MSG FILE TYPE HOLE COLN) (defalias 'haskell-check-paint-overlay #[2056 "rq\210\303\211eb\210\2033Sy\210Su\210`\262\304=\203(Gu\210\202-\305\306 w\210`\262\202<`\262\303y\210`\262\307\"\310\311\312#\210\310\313 #\210\310\314\n#\210\310\315#\210\310\316\n#\210\310\317#\210\320\267\202\201\321D\202\202\322 D\202\202\323\nD\202\202\303\211A\262\242\242\310\324#\210\310\325#\266\203\262\266\202)\207" [haskell-check-warning-fringe haskell-check-hole-fringe haskell-check-error-fringe nil hole "^[:space:]" line-end-position make-overlay overlay-put haskell-check t haskell-file haskell-msg haskell-msg-type help-echo haskell-hole #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (warning 111 hole 117 error 123)) haskell-warning-face haskell-hole-face haskell-error-face before-string face] 18 (#$ . 13221)]) #@268 Trigger handling type errors or warnings. Either prints the messages in the interactive buffer or if CONT is specified, passes the error onto that. When MODULE-BUFFER is non-NIL, paint error overlays. (fn MODULE-BUFFER SESSION PROCESS BUFFER &optional RETURN-ONLY) (defalias 'haskell-process-errors-warnings #[1284 "\212\302\303\"\203U\304\305\"\306\307\"\203O\310!\304\305\"\304\311\"\312!\204<\313\314\315\211&\210\316\317\320#\"\210\321\322\305\323\324\325\n\326\327\257\n)\266\203\202P\330\262\202\302\331\"\205\332\333!S\"\210\334!\304\305\"\304\311\"\304\335\"\306\336\"\203~\337\202\212\306\340\"\203\211\341\202\212\327\211\337=?\317\342\343\f\"$\344\345\346R!\347\322\"\347\323\"\203\320 \203\320\350\351\352!!\351\f!\230\n  \315&\210\n\203\351\321 \322\323\325 \326\257\n\266\212\202\353\267\202\373\354\202\374\355\202\374\316\202\374\315\"\210\203 \356!\210\357 $\266 \330)\207" [default-directory haskell-process-show-overlays haskell-process-consume "\\(Module imports form a cycle:[ \n]+module [^ ]+ ([^)]+)[[:unibyte:][:nonascii:]]+?\\)\nFailed" match-string 1 string-match "module [`'‘‛]\\([^ ]+\\)['’`] (\\([^)]+\\))" haskell-session-current-dir 2 file-relative-name haskell-interactive-show-load-message import-cycle nil haskell-interactive-mode-compile-error format "%s:1:0: %s" :file :line :col 0 :msg :type error t "[ \n]\\([A-Z]?:?[^ \n:][^:\n ]+\\):\\([0-9()-:]+\\):[ \n ]+\\([[:unibyte:][:nonascii:]]+?\\)\n[^ ]" haskell-process-set-response-cursor haskell-process-response-cursor haskell-process-response 3 "^[Ww]arning:" warning "^Splicing " splice "%s:%s: %s" haskell-session-strip-dir haskell-process-parse-error ":" ": x" plist-get haskell-check-paint-overlay file-truename buffer-file-name #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (warning 239 splice 243 error 247)) haskell-interactive-mode-compile-warning haskell-interactive-mode-compile-splice haskell-mode-message-line haskell-process-trigger-suggestions] 25 (#$ . 14158)]) #@92 Show the '(Compiling|Loading) X' message. (fn SESSION TYPE MODULE-NAME FILE-NAME ECHO TH) (defalias 'haskell-interactive-show-load-message #[1542 "\302\267\202'\203\303\304#\2021\303\305\"\2021\303\306\"\2021\303\307\"\2021\310\311\312#\2051\313\2039\314\202:\315P\316!\210 \203I\317\"\210\205R\320\"\207" [haskell-interactive-mode-include-file-name haskell-interactive-mode-delete-superseded-errors #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (quote 6 compiling 6 loading 25 import-cycle 32)) format "Compiling: %s (%s)" "Compiling: %s" "Loading: %s" "Module has an import cycle: %s" error "cl-ecase failed: %s, %s" (compiling quote loading quote import-cycle quote) nil " [TH]" "" haskell-mode-message-line haskell-interactive-mode-delete-compile-messages haskell-interactive-mode-echo] 10 (#$ . 16276)]) #@360 Reload the module `DevelMain' and then run `DevelMain.update'. This is for doing live update of the code of servers or GUI applications. Put your development version of the program in `DevelMain', and define `update' to auto-start the program on a new thread, and use the `foreign-store' package to access the running context across :load/:reloads in GHCi. (defalias 'haskell-process-reload-devel-main #[0 "\300 \210\301\216r\302\303!\206\304\305!\203\306 \202\307\310!q\210\311 \312 \313\314\315\316\317\320p\257\321\322\323%\"\262\262*\207" [haskell-mode-toggle-interactive-prompt-state #[0 "\300\301!\207" [haskell-mode-toggle-interactive-prompt-state t] 2] get-buffer "DevelMain.hs" y-or-n-p "You need to open a buffer named DevelMain.hs. Find now?" ido-find-file error "No DevelMain.hs buffer." haskell-interactive-session haskell-interactive-process haskell-process-queue-command record haskell-command :session :process :buffer #[257 "\300\301\302\"\303\"\207" [haskell-process-send-string plist-get :process ":l DevelMain"] 5 "\n\n(fn STATE)"] #[514 "\300\301\302\"\303#\207" [haskell-process-live-build plist-get :process nil] 6 "\n\n(fn STATE BUFFER)"] #[514 "\300\301\302\"\301\303\"\304\301\305\"\306&\207" [haskell-process-load-complete plist-get :session :process nil :buffer #[257 "\211\205 \300\301 \302\"\210\303\304!\207" [haskell-process-queue-without-filters haskell-interactive-process "DevelMain.update" message "DevelMain updated."] 4 "\n\n(fn OK)"]] 10 "\n\n(fn STATE RESPONSE)"]] 12 (#$ . 17162) nil]) (provide 'haskell-load)