;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\305\306\307\310\311\312\313\314&\210\315\316\317\320\321DD\322\313\306\323\324&\210\315\325\317\320\326DD\327\313\306\323\324&\210\315\330\317\320\331DD\332\313\306\323\324&\210\315\333\317\320\334DD\335\313\306\323\324&\210\315\336\317\320\337DD\340\313\306\323\324&\210\315\341\317\320\342DD\343\313\306\323\344&\210\315\345\317\320\346DD\347\323\350\313\306&\210\351\345!\207" [require compile haskell-cabal haskell-customize ansi-color custom-declare-group haskell-compile nil "Settings for Haskell compilation mode" :link (custom-manual "(haskell-mode)compilation") :group haskell custom-declare-variable haskell-compile-cabal-build-command funcall function #[0 "\300\207" [#1="cabal build --ghc-option=-ferror-spans"] 1 #1#] "Default build command to use for `haskell-cabal-build' when a cabal file is detected.\nFor legacy compat, `%s' is replaced by the cabal package top folder." :type string haskell-compile-cabal-build-alt-command #[0 "\300\207" [#2="cabal clean -s && cabal build --ghc-option=-ferror-spans"] 1 #2#] "Alternative build command to use when `haskell-cabal-build' is called with a negative prefix argument.\nFor legacy compat, `%s' is replaced by the cabal package top folder." haskell-compile-stack-build-command #[0 "\300\207" [#3="stack build --fast"] 1 #3#] "Default build command to use for `haskell-stack-build' when a stack file is detected.\nFor legacy compat, `%s' is replaced by the stack package top folder." haskell-compile-stack-build-alt-command #[0 "\300\207" [#4="stack clean && stack build --fast"] 1 #4#] "Alternative build command to use when `haskell-stack-build' is called with a negative prefix argument.\nFor legacy compat, `%s' is replaced by the stack package top folder." haskell-compile-command #[0 "\300\207" [#5="ghc -Wall -ferror-spans -fforce-recomp -c %s"] 1 #5#] "Default build command to use for `haskell-cabal-build' when no cabal or stack file is detected.\nThe `%s' placeholder is replaced by the current buffer's filename." haskell-compile-ghc-filter-linker-messages #[0 "\300\207" [t] 1] "Filter out unremarkable \"Loading package...\" linker messages during compilation." boolean haskell-compiler-type #[0 "\300\207" [auto] 1] "Controls whether to use cabal, stack, or ghc to compile.\n Auto (the default) means infer from the presence of a cabal or stack spec file,\n following same rules as haskell-process-type." (choice (const auto) (const ghc) (const stack) (const cabal)) make-variable-buffer-local] 8) #@101 Regexps used for matching GHC compile messages. See `compilation-error-regexp-alist' for semantics. (defconst haskell-compilation-error-regexp-alist (byte-code "\300\301B\302B\207" ["^ *\\([^\n >]* *> \\)?\\(?1:[^ \n]+?\\):\\(?:\\(?2:[0-9]+\\):\\(?4:[0-9]+\\)\\(?:-\\(?5:[0-9]+\\)\\)?\\|(\\(?2:[0-9]+\\),\\(?4:[0-9]+\\))-(\\(?3:[0-9]+\\),\\(?5:[0-9]+\\))\\):\\(?6:\n?[ ]+[Ww]arning:\\)?" (1 (2 . 3) (4 . 5) (6)) (("^ \\(?:Declared at:\\| \\) \\(?1:[^ \n]+\\):\\(?2:[0-9]+\\):\\(?4:[0-9]+\\)$" 1 2 4 0) (".*error, called at \\(.*\\.hs\\):\\([0-9]+\\):\\([0-9]+\\) in .*" 1 2 3 2 1) (" +\\(.*\\.hs\\):\\([0-9]+\\):$" 1 2 nil 2 1) (" at \\(?1:[^ \n]+\\):\\(?2:[0-9]+\\):\\(?4:[0-9]+\\)\\(?:-\\(?5:[0-9]+\\)\\)?[)]?$" 1 2 (4 . 5) 0))] 2) (#$ . 2639)) #@91 Keymap for `haskell-compilation-mode' buffers. This is a child of `compilation-mode-map'. (defvar haskell-compilation-mode-map (byte-code "\301 \302\"\207" [compilation-mode-map make-sparse-keymap set-keymap-parent] 4) (#$ . 3413)) #@65 Local `compilation-filter-hook' for `haskell-compilation-mode'. (defalias 'haskell-compilation-filter-hook #[0 "\203\303\304\212 b\210\305 )`#\210\306\307 d\")\207" [haskell-compile-ghc-filter-linker-messages compilation-filter-start inhibit-read-only delete-matching-lines "^ *Loading package [^ \n]+ [.]+ linking [.]+ done\\.$" line-beginning-position t ansi-color-apply-on-region] 4 (#$ . 3653)]) (defvar haskell-compilation-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [haskell-compilation-mode-hook variable-documentation put "Hook run after entering HsCompilation mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp haskell-compilation-mode-map definition-name haskell-compilation-mode] 4) (defvar haskell-compilation-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#\207" [haskell-compilation-mode-abbrev-table haskell-compilation-mode-map variable-documentation put purecopy "Keymap for `haskell-compilation-mode'." boundp haskell-compilation-mode-syntax-table definition-name haskell-compilation-mode (lambda (#1=#:def-tmp-var) (defvar haskell-compilation-mode-syntax-table #1#)) make-syntax-table "Syntax table for `haskell-compilation-mode'." (lambda (#1#) (defvar haskell-compilation-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `haskell-compilation-mode'." derived-mode-parent compilation-mode] 5) #@486 Haskell/GHC specific `compilation-mode' derivative. This mode provides support for GHC 7.[46]'s compile messages. Specifically, also the `-ferror-spans` source location format is supported, as well as info-locations within compile messages pointing to additional source locations. In addition to any hooks its parent mode might have run, this mode runs the hook `haskell-compilation-mode-hook', as the final or penultimate step during initialization. \{haskell-compilation-mode-map} (defalias 'haskell-compilation-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  =\204R\326 \325 C#\210\327 !\210\330\f!\210  \306\331!\210!\306\331!\210!\332\333\334\335\307$\210)\336\337!\207" [delay-mode-hooks major-mode mode-name haskell-compilation-mode-map haskell-compilation-mode-syntax-table haskell-compilation-mode-abbrev-table make-local-variable t compilation-mode haskell-compilation-mode "HsCompilation" 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 compilation-error-regexp-alist add-hook compilation-filter-hook haskell-compilation-filter-hook nil run-mode-hooks haskell-compilation-mode-hook local-abbrev-table haskell-compilation-error-regexp-alist] 5 (#$ . 5400) nil]) #@851 Run a compile command for the current Haskell buffer. Obeys haskell-compiler-type to choose the appropriate build command. If prefix argument EDIT-COMMAND is non-nil (and not a negative prefix `-'), prompt for a custom compile command. If EDIT-COMMAND contains the negative prefix argument `-', call the alternative command defined in `haskell-compile-stack-build-alt-command' / `haskell-compile-cabal-build-alt-command'. If there is no prefix argument, the most recent custom compile command is used, falling back to `haskell-compile-stack-build-command' for stack builds `haskell-compile-cabal-build-command' for cabal builds, and `haskell-compile-command' otherwise. '% characters in the `-command' templates are replaced by the base directory for build tools, or the current buffer for `haskell-compile-command'. (fn &optional EDIT-COMMAND) (defalias 'haskell-compile #[256 "\306? \"\210\307\211\n\310\267\2027\311\262\312 \262\202;\313\262\314 \315\"\262\202;\316\262\202;\317 \211@\262\211A\266\202\202;\320\321!\210\311=\204G\322=\203b\f \322=\203Y\323P\262\211\323P\262\324\325%\207\326\267\202|\324\327%\207\324\330 \331\211%\207\311=\204\210\322=\205\244\f \322=\203\232\323P\262\211\323P\262\324\325%\266\202\207" [compilation-ask-about-save compilation-save-buffers-predicate haskell-compiler-type default-directory haskell-compile-cabal-build-command haskell-compile-cabal-build-alt-command save-some-buffers nil #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (cabal 14 stack 24 ghc 36 auto 42)) cabal haskell-cabal-find-dir stack locate-dominating-file "stack.yaml" ghc haskell-build-type error "Invalid haskell-compiler-type" cabal-project " all" haskell--compile haskell--compile-cabal-last #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (stack 104 ghc 114)) haskell--compile-stack-last buffer-file-name haskell--compile-ghc-last haskell-compile-stack-build-command haskell-compile-stack-build-alt-command haskell-compile-command] 11 (#$ . 6898) "P"]) (defvar haskell--compile-stack-last nil) (defvar haskell--compile-cabal-last nil) (defvar haskell--compile-ghc-last nil) #@47 (fn DIR-OR-FILE EDIT LAST-SYM FALLBACK ALT) (defalias 'haskell--compile #[1285 "\206\302\303\"\206 \211J\211@\211A\211\203\"\211=\203\" \206#\204,\211\202:\304=\2037\202:\305!\306\"\307!\203J\202K\307!\203[\310\311!!\202_\312!\f\304=\204n  BL\210\313\314\315\316\"#*\207" [default-directory last-command file-remote-p localname - compilation-read-command format directory-name-p file-name-base directory-file-name file-name-nondirectory compilation-start haskell-compilation-mode make-closure #[257 "\301\302\300#\207" [V0 format "*%s* <%s>"] 5 "\n\n(fn MODE)"]] 20 (#$ . 9125)]) (provide 'haskell-compile)