;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311\312\313&\210\314\315\316\317\320DD\321\312\305\322\323&\207" [require haskell-mode haskell-process haskell-interactive-mode custom-declare-group haskell-completions nil "Settings for completions provided by `haskell-mode'" :link (custom-manual "(haskell-mode)Completion support") :group haskell custom-declare-variable haskell-completions-complete-operators funcall function #[0 "\300\207" [t] 1] "Should `haskell-completions-sync-repl-completion-at-point' complete operators.\n\nNote: GHCi prior to version 8.0.1 have bug in `:complete`\n command: when completing operators it returns a list of all\n imported identifiers (see Track ticket URL\n `https://ghc.haskell.org/trac/ghc/ticket/10576'). This leads to\n significant Emacs slowdown. To aviod slowdown you should set\n this variable to `nil'." :type boolean] 8) #@154 A list of supported pragmas. This list comes from GHC documentation (URL `https://downloads.haskell.org/~ghc/7.10.1/docs/html/users_guide/pragmas.html'. (defvar haskell-completions--pragma-names (list "DEPRECATED" "INCLUDE" "INCOHERENT" "INLINABLE" "INLINE" "LANGUAGE" "LINE" "MINIMAL" "NOINLINE" "NOUNPACK" "OPTIONS" "OPTIONS_GHC" "OVERLAPPABLE" "OVERLAPPING" "OVERLAPS" "RULES" "SOURCE" "SPECIALIZE" "UNPACK" "WARNING") (#$ . 985)) #@152 A list of Haskell's keywords (URL `https://wiki.haskell.org/Keywords'). Single char keywords and operator like keywords are not included in this list. (defvar haskell-completions--keywords (list "as" "case" "class" "data family" "data instance" "data" "default" "deriving instance" "deriving" "do" "else" "family" "forall" "foreign import" "foreign" "hiding" "if" "import qualified" "import" "in" "infix" "infixl" "infixr" "instance" "let" "mdo" "module" "newtype" "of" "proc" "qualified" "rec" "signature" "then" "type family" "type instance" "type" "where") (#$ . 1426)) #@279 Check if the case is appropriate for grabbing completion prefix. Returns t if point is either at whitespace character, or at punctuation, or at line end and preceding character is not a whitespace or new line, otherwise returns nil. Returns nil in presence of active region. (defalias 'haskell-completions-can-grab-prefix #[0 "\301 ?\205&\302\303\304!)\262\205&o?\205&\212\305u\210\306\303\304!)\262)?\207" [inhibit-changing-match-data region-active-p "[[:space:]]\\|$\\|[[:punct:]]" t looking-at -1 "[[:space:]]\\|$"] 3 (#$ . 2006)]) #@370 Grab completion prefix for pragma completions. Returns a list of form '(prefix-start-position prefix-end-position prefix-value prefix-type) for pramga names such as WARNING, DEPRECATED, LANGUAGE etc. Also returns completion prefixes for options in case OPTIONS_GHC pragma, or language extensions in case of LANGUAGE pragma. Obsolete OPTIONS pragma is supported also. (defalias 'haskell-completions-grab-pragma-prefix #[0 "\303\304 8\205\310`\305\304 8\306\211\211\211\211\212 b\210\307\310!\203\273\311\225V\203\272\211b\210\307\312!\203\272\311\225\313\311! =\203N\262\262\211\262\314\262\266\202\273 V\203\270\211\315\232\204g\211\316\232\204g\211\317\232\203\270b\210\320\321 \322#\203\270\313\311!\323\324\322#\325!@` \232\203\266\326\306\322\327#)\266\203\204\266\262G\206\240\330[u\210`\262 \211\262\n\317\232\204\263\331\202\264\332\262 \266\266\210)\211\205\305F*\266\207\207" [case-fold-search comment-start inhibit-changing-match-data 4 syntax-ppss 8 nil looking-at "{-#\\(?:[[:space:]]\\|\n\\)+" 0 "\\(?:[[:upper:]]\\|_\\)+" match-string-no-properties haskell-completions-pragma-name-prefix "OPTIONS_GHC" "OPTIONS" "LANGUAGE" re-search-forward "[^z-a]*\\S-+" t split-string "[[:space:]]\\|\n" last "#" string-match 1 haskell-completions-ghc-option-prefix haskell-completions-language-extension-prefix] 21 (#$ . 2560)]) #@236 Grab completion prefix for identifier at point. Returns a list of form '(prefix-start-position prefix-end-position prefix-value prefix-type) for haskell identifier at point depending on result of function `haskell-ident-pos-at-point'. (defalias 'haskell-completions-grab-identifier-prefix #[0 "\302 `\205j@A\303\304\211X\205g\262\305\"\262\306\304\307\310#)\266\203\203T\212\311 b\210\312\313\307#\203S`\232\203H\314\262\202S\312\315\307#\203S\303\262)\316\317 8\203^\320\262\211\205gF)\266\204\207" [case-fold-search inhibit-changing-match-data haskell-ident-pos-at-point haskell-completions-identifier-prefix nil buffer-substring-no-properties "\\`[[:upper:]]" t string-match line-beginning-position re-search-forward "import\\(?:[[:space:]]+qualified\\)?[[:space:]]+[[:upper:]]\\(?:[[:alnum:]]\\|\\.\\)+" haskell-completions-module-name-prefix "\\(?: as \\|(\\)" 8 syntax-ppss haskell-completions-general-prefix] 14 (#$ . 3955)]) #@786 Grab prefix at point for possible completion. Returns a list of form '(prefix-start-position prefix-end-position prefix-value prefix-type) depending on situation, e.g. is it needed to complete pragma, module name, arbitrary identifier, etc. Returns nil in case it is impossible to grab prefix. Possible prefix types are: * haskell-completions-pragma-name-prefix * haskell-completions-ghc-option-prefix * haskell-completions-language-extension-prefix * haskell-completions-module-name-prefix * haskell-completions-identifier-prefix * haskell-completions-general-prefix the last type is used in cases when completing things inside comments. If provided optional MINLEN parameter this function will return result only if prefix length is not less than MINLEN. (fn &optional MINLEN) (defalias 'haskell-completions-grab-prefix #[256 "\300 \205,\301 \206\302 \206\303\203%\211\203%\3048GY\205*\211\202*\211\205*\211\262\207" [haskell-completions-can-grab-prefix haskell-completions-grab-pragma-prefix haskell-completions-grab-identifier-prefix nil 2] 4 (#$ . 4931)]) #@404 Provide a list of completion candidates for given PREFIX. This function is used internally in `haskell-completions-completion-at-point' and `haskell-completions-sync-repl-completion-at-point'. It provides completions for haskell keywords, language pragmas, GHC's options, and language extensions. PREFIX should be a list such one returned by `haskell-completions-grab-identifier-prefix'. (fn PREFIX) (defalias 'haskell-completions--simple-completions #[257 "\211\211A\262\242\211A\262\242\306\211A\262\210\242\211\307=?\205C\211\310\267\202/\202= \202=\n\202=\311\312\303!\205; \205;\f \"E\262\207" [haskell-completions--pragma-names haskell-ghc-supported-options haskell-ghc-supported-extensions haskell-tags-on-save tags-completion-table haskell-completions--keywords nil haskell-completions-general-prefix #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (quote 35 haskell-completions-pragma-name-prefix 35 haskell-completions-ghc-option-prefix 39 haskell-completions-language-extension-prefix 43)) append boundp] 10 (#$ . 6019)]) #@228 Provide completion list for thing at point. This function is used in non-interactive `haskell-mode'. It provides completions for haskell keywords, language pragmas, GHC's options, and language extensions, but not identifiers. (defalias 'haskell-completions-completion-at-point #[0 "\300 \211\205 \301!\207" [haskell-completions-grab-prefix haskell-completions--simple-completions] 3 (#$ . 7118)]) #@377 A completion function used in `interactive-haskell-mode'. Completion candidates are provided quering current haskell process, that is sending `:complete repl' command. Completes all possible things: everything that can be completed with non-interactive function `haskell-completions-completion-at-point' plus identifier completions. Returns nil if no completions available. (defalias 'haskell-completions-sync-repl-completion-at-point #[0 "\302 \211\205\\\211\211A\262\242\211A\262\242\211A\262\242\242\211\303=?\205Z\2042\212Sb\210\304 )?\205Z\211\305>\203=\306!\207\211\307=\310 \205Q\311\312 !?\205Q\313\"\314 \"E\266\202\266\205\207" [haskell-completions-complete-operators haskell-completions--keywords haskell-completions-grab-prefix haskell-completions-general-prefix haskell-mode--looking-at-varsym (haskell-completions-pragma-name-prefix haskell-completions-ghc-option-prefix haskell-completions-language-extension-prefix) haskell-completions--simple-completions haskell-completions-module-name-prefix haskell-session-maybe haskell-process-cmd haskell-interactive-process haskell-completions-sync-complete-repl append] 13 (#$ . 7525)]) #@258 Return completion list for given PREFIX querying REPL synchronously. When optional IMPORT argument is non-nil complete PREFIX prepending "import " keyword (useful for module names). This function is supposed for internal use. (fn PREFIX &optional IMPORT) (defalias 'haskell-completions-sync-complete-repl #[513 "\300\301 \203 \302P\202\"\207" [haskell-process-get-repl-completions haskell-interactive-process "import "] 6 (#$ . 8702)]) (provide 'haskell-completions)