;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%\210\313\314\315\316\317DD\320\311\306\321\322&\210\313\323\315\316\324DD\325\321\326\311\306&\210\313\327\315\316\330DD\331\311\306\321\332&\207" [require cl-lib haskell-lexeme haskell-string font-lock custom-declare-group haskell-appearance nil "Haskell Appearance." :group haskell custom-declare-variable haskell-font-lock-symbols funcall function #[0 "\300\207" [nil] 1] "Display \\ and -> and such using symbols in fonts.\n\nThis may sound like a neat trick, but be extra careful: it changes the\nalignment and can thus lead to nasty surprises with regards to layout." :type boolean haskell-font-lock-symbols-alist #[0 "\300\207" [(("\\" . "λ") ("not" . "¬") ("->" . "→") ("<-" . "←") ("=>" . "⇒") ("()" . "∅") ("==" . "≡") ("/=" . "≢") (">=" . "≥") ("<=" . "≤") ("!!" . "‼") ("&&" . "∧") ("||" . "∨") ("sqrt" . "√") ("undefined" . "⊥") ("pi" . "π") ("~>" . "⇝") ("-<" . "↢") ("::" . "∷") ("." "∘" haskell-font-lock-dot-is-not-composition) ("forall" . "∀"))] 1] "Alist mapping Haskell symbols to chars.\n\nEach element has the form (STRING . COMPONENTS) or (STRING\nCOMPONENTS PREDICATE).\n\nSTRING is the Haskell symbol.\nCOMPONENTS is a representation specification suitable as an argument to\n`compose-region'.\nPREDICATE if present is a function of one argument (the start position\nof the symbol) which should return non-nil if this mapping should\nbe disabled at that position." (alist string string) haskell-font-lock-keywords #[0 "\300\207" [("case" "class" "data" "default" "deriving" "do" "else" "if" "import" "in" "infix" "infixl" "infixr" "instance" "let" "module" "mdo" "newtype" "of" "rec" "pattern" "proc" "signature" "then" "type" "where" "_" "anyclass" "stock" "via")] 1] "Identifiers treated as reserved keywords in Haskell." (repeat string)] 8) #@146 Return non-nil if the "." at START is not a composition operator. This is the case if the "." is part of a "forall . ". (fn START) (defalias 'haskell-font-lock-dot-is-not-composition #[257 "\212\211b\210\300\301\302 \303#\206-\304f!\305\230\206,\211\206`Sf?\206,\304\206'`Sf!\305\230?)\207" [re-search-backward "\\[^.\"]*\\=" line-beginning-position t string " "] 5 (#$ . 1988)]) (defvar haskell-yesod-parse-routes-mode-keywords '(("^\\([^ \n]+\\)\\(?:[ ]+\\([^ \n]+\\)\\)?" (1 'font-lock-string-face) (2 'haskell-constructor-face nil lax)))) (defvar haskell-yesod-parse-routes-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-yesod-parse-routes-mode-hook variable-documentation put "Hook run after entering Yesod parseRoutes mode 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-yesod-parse-routes-mode-map definition-name haskell-yesod-parse-routes-mode] 4) (defvar haskell-yesod-parse-routes-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-yesod-parse-routes-mode-abbrev-table haskell-yesod-parse-routes-mode-map variable-documentation put purecopy "Keymap for `haskell-yesod-parse-routes-mode'." boundp haskell-yesod-parse-routes-mode-syntax-table definition-name haskell-yesod-parse-routes-mode (lambda (#1=#:def-tmp-var) (defvar haskell-yesod-parse-routes-mode-syntax-table #1#)) make-syntax-table "Syntax table for `haskell-yesod-parse-routes-mode'." (lambda (#1#) (defvar haskell-yesod-parse-routes-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `haskell-yesod-parse-routes-mode'." derived-mode-parent text-mode] 5) #@264 Mode for parseRoutes from Yesod. In addition to any hooks its parent mode `text-mode' might have run, this mode runs the hook `haskell-yesod-parse-routes-mode-hook', as the final or penultimate step during initialization. \{haskell-yesod-parse-routes-mode-map} (defalias 'haskell-yesod-parse-routes-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 \325C#\210\327 !\210\330\f!\210 \306\331!\210\332)\333\334!\207" [delay-mode-hooks major-mode mode-name haskell-yesod-parse-routes-mode-map haskell-yesod-parse-routes-mode-syntax-table haskell-yesod-parse-routes-mode-abbrev-table make-local-variable t text-mode haskell-yesod-parse-routes-mode "Yesod parseRoutes mode" 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 font-lock-defaults (haskell-yesod-parse-routes-mode-keywords t t nil nil) run-mode-hooks haskell-yesod-parse-routes-mode-hook local-abbrev-table] 5 (#$ . 4007) nil]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\312\313\314\315\306\307%\210\312\316\317\320\306\307%\210\312\321\322\323\306\307%\210\312\324\325\326\306\307%\210\312\327\330\331\306\307%\210\312\332\333\334\306\307%\210\312\335\336\337\306\307%\210\312\340\341\342\306\307%\210\312\343\344\345\306\307%\207" [custom-declare-variable haskell-font-lock-quasi-quote-modes funcall function #[0 "\300\207" [(("hsx" . xml-mode) ("hamlet" . shakespeare-hamlet-mode) ("shamlet" . shakespeare-hamlet-mode) ("whamlet" . shakespeare-hamlet-mode) ("xmlQQ" . xml-mode) ("xml" . xml-mode) ("cmd" . shell-mode) ("sh_" . shell-mode) ("jmacro" . javascript-mode) ("jmacroE" . javascript-mode) ("r" . ess-mode) ("rChan" . ess-mode) ("sql" . sql-mode) ("json" . json-mode) ("aesonQQ" . json-mode) ("parseRoutes" . haskell-yesod-parse-routes-mode))] 1] "Mapping from quasi quoter token to fontification mode.\n\nIf a quasi quote is seen in Haskell code its contents will have\nfont faces assigned as if respective mode was enabled." :group haskell-appearance :type (repeat (cons string symbol)) custom-declare-face haskell-keyword-face ((t :inherit font-lock-keyword-face)) "Face used to highlight Haskell keywords." haskell-type-face ((t :inherit font-lock-type-face)) "Face used to highlight Haskell types" haskell-constructor-face ((t :inherit font-lock-type-face)) "Face used to highlight Haskell constructors." haskell-definition-face ((t :inherit font-lock-function-name-face)) "Face used to highlight Haskell definitions." haskell-operator-face ((t :inherit font-lock-variable-name-face)) "Face used to highlight Haskell operators." haskell-pragma-face ((t :inherit font-lock-preprocessor-face)) "Face used to highlight Haskell pragmas ({-# ... #-})." haskell-liquid-haskell-annotation-face ((t :inherit haskell-pragma-face)) "Face used to highlight LiquidHaskell annotations ({-@ ... @-})." haskell-literate-comment-face ((t :inherit font-lock-doc-face)) "Face with which to fontify literate comments.\nInherit from `default' to avoid fontification of them." haskell-quasi-quote-face ((t :inherit font-lock-string-face)) "Generic face for quasiquotes.\n\nSome quote types are fontified according to other mode defined in\n`haskell-font-lock-quasi-quote-modes'."] 8) #@103 Compose a sequence of ascii chars into a symbol. Regexp match data 0 points to the chars. (fn ALIST) (defalias 'haskell-font-lock-compose-symbol #[257 "\300\224\300\225fz\301=\203\302\202/fz\303=\203\304\202/f\303=\203.\211TU\203.\305\202/\306\307\2065`Sf\206;\310z>\204yf\206G\310z>\204y\311 \312\234\204y\311 \313\234\204y\314\315\300!\"A\211\262:\203\203\211A@@\262\211!\262\203\203\316\317#\266\202\212\320#\266\307\207" [0 119 (119) 46 (46) (95 92 119) (95 92) nil 32 syntax-ppss 3 4 assoc match-string remove-text-properties (composition) compose-region] 9 (#$ . 7491)]) (defalias 'haskell-font-lock-symbols-keywords #[0 "\205 \205\302\303\304 \"\305\"\306\307\310 DD\311BBDC\207" [haskell-font-lock-symbols haskell-font-lock-symbols-alist regexp-opt mapcar car t 0 haskell-font-lock-compose-symbol quote (keep)] 5]) #@239 Find where does this type declaration end. Moves the point to the end of type declaration. It should be invoked with point just after one of type introducing keywords like ::, class, instance, data, newtype, type. (fn &optional IGNORE) (defalias 'haskell-font-lock--forward-type #[256 "\301`\302\301\302\303\203\304\305!\262\204\302\262\202\305=\203.?\262\303\225\262\303\225b\210\202\306\303!\307\235\203S\211S\262\211\303W\203F\302\262\202M\303\225\262b\210\302\262\202\306\303!\310\235\203\200\306\303!\235\204\200\211\303=\203p\302\262\202z\301\262\303\225\262b\210\302\262\202\306\303!\311\235\204\220\306\303!\235\203\242\306\303!\235\204\242\302\262\302\262\202\306\303!\312\235\203\305\203\264\302\262\202\211T\262\303\225\262b\210\302\262\202\313\267\202\371\314\315\224f!\316>\262\204\342\203\342\302\262\202\351\303\225b\210`\262\302\262\202\303\225b\210`\262\202\303\225b\210`\262\302\262\202b\207" [haskell-font-lock-keywords t nil 0 haskell-lexeme-looking-at-token newline match-string-no-properties (")" "]" "}") ("," ";" "|") ("<-" "=" "←") ("(" "[" "{") #s(hash-table size 9 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (qsymid 203 char 203 string 203 number 203 template-haskell-quote 203 template-haskell-quasi-quote 203 comment 239 nested-comment 239 literate-comment 239)) haskell-lexeme-classify-by-first-char 1 (varsym consym)] 9 (#$ . 8368) nil]) #@93 Private function used to select either type or constructor face on an uppercase identifier. (defalias 'haskell-font-lock--select-face-on-type-or-constructor #[0 "\301\302\224f!\211\303\267\202\243\304\305!\211\235\203D\211\306\235\203B\212\305\225b\210\307 \310\311\"\216\312\313\267\2025\314\2026\315\2026\316!\210)\210\317\305\225`\320#\210)\321\207\211\322\235\205S\323\305\224\324\"\205S\321\207\323\305\224\324\"\203^\325\207\326\207\327\305!\330\235\205n\331\305\224!\332\232?\205\244\333\207\327\302!\334\235\204\210\323\305\224\324\"\203\206\325\207\326\207\212\305\225b\210\307 \310\335\"\216\312 \210)\210\317\305\225`\336#\210)\333\207\316\207" [haskell-font-lock-keywords haskell-lexeme-classify-by-first-char 1 #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (varid 11 conid 84 varsym 96 consym 116)) match-string-no-properties 0 ("class" "instance" "type" "data" "newtype") match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] haskell-font-lock--forward-type #s(hash-table size 3 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("class" 45 "instance" 45 "type" 49)) ("|") ("=" "instance") nil add-text-properties (font-lock-multiline t haskell-type t) haskell-keyword-face ("forall") get-text-property haskell-type haskell-type-face haskell-constructor-face match-string ("-" "+" ".") syntax-after (2) haskell-operator-face ("::" "∷") #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] (font-lock-multiline t haskell-type t)] 6 (#$ . 9851)]) #@90 Private function used to put either type or constructor face on an uppercase identifier. (defalias 'haskell-font-lock--put-face-on-type-or-constructor #[0 "\300 \211\205\301\302\224\302\225\303\304$?\205\305\302\224\302\225\303$\207" [haskell-font-lock--select-face-on-type-or-constructor text-property-not-all 0 face nil put-text-property] 6 (#$ . 11424)]) #@29 Generate font lock eywords. (defalias 'haskell-font-lock-keywords #[0 "\302\211\303P\304P\305P\306P\307P\310\311\312\313 \314\315\316\317\320 \321B \322B \323B \324B \325B\326\327\330 \331B\257\"B\262)\207" [line-prefix haskell-lexeme-idsym-first-char "^\\(?:> ?\\)?" "\\([[:lower:]_][[:alnum:]'_]*\\(?:\\s-*,\\s-*[[:lower:]_][[:alnum:]'_]*\\)*\\)\\(\\s-+\\|\\s-*[\n]\\s-+\\)\\([[:lower:]_][[:alnum:]'_]*\\|'?[[:upper:]][[:alnum:]'_]*\\|::\\|∷\\|=\\||\\|\\s(\\|[0-9\"']\\)" "\\([[:lower:]_][[:alnum:]'_]*\\|'?[[:upper:]][[:alnum:]'_]*\\)\\s-*`\\([[:lower:]_][[:alnum:]'_]*\\)`" "\\([[:lower:]_][[:alnum:]'_]*\\)\\s-*!" "\\([[:lower:]_][[:alnum:]'_]*\\|'?[[:upper:]][[:alnum:]'_]*\\)\\s-*\\(\\s.+\\)" "(\\(\\s.+\\))" nil ("^#\\(?:[^\\\n]\\|\\\\\\(?:.\\|\n\\|\\'\\)\\)*\\(?:\n\\|\\'\\)" 0 'font-lock-preprocessor-face t) append haskell-font-lock-symbols-keywords ("\\\\)[ ]*\\)?\\(?:\\(qualified\\>\\)[ ]*\\)?\\(?:\"[^\"]*\"[ ]*\\)?[^ \n()]+[ ]*\\(?:\\(qualified\\>\\)[ ]*\\)?\\(?:\\(\\\\)[ ]*[^ \n()]+[ ]*\\)?\\(\\\\)?" (1 'haskell-keyword-face nil lax) (2 'haskell-keyword-face nil lax) (3 'haskell-keyword-face nil lax) (4 'haskell-keyword-face nil lax) (5 'haskell-keyword-face nil lax)) ("\\<\\(foreign\\)[ ]+\\(import\\)[ ]+\\(?:\\(ccall\\|stdcall\\|cplusplus\\|jvm\\|dotnet\\)[ ]+\\)?\\(?:\\(safe\\|unsafe\\|interruptible\\)[ ]+\\)?" (1 'haskell-keyword-face nil lax) (2 'haskell-keyword-face nil lax) (3 'haskell-keyword-face nil lax) (4 'haskell-keyword-face nil lax)) ("\\<\\(foreign\\)[ ]+\\(export\\)[ ]+\\(?:\\(ccall\\|stdcall\\|cplusplus\\|jvm\\|dotnet\\)[ ]+\\)?" (1 'haskell-keyword-face nil lax) (2 'haskell-keyword-face nil lax) (3 'haskell-keyword-face nil lax)) ("\\<\\(type\\|data\\)[ ]+\\(family\\>\\)" (1 'haskell-keyword-face nil lax) (2 'haskell-keyword-face nil lax)) ("\\<\\(type\\)[ ]+\\(role\\>\\)" (1 'haskell-keyword-face nil lax) (2 'haskell-keyword-face nil lax)) ((1 (unless (member (match-string 1) haskell-font-lock-keywords) 'haskell-definition-face))) ((2 (unless (member (match-string 2) haskell-font-lock-keywords) 'haskell-definition-face))) ((1 (unless (member (match-string 1) haskell-font-lock-keywords) 'haskell-definition-face))) ((2 (unless (member (match-string 2) '("\\" "=" "->" "→" "<-" "←" "::" "∷" "," ";" "`")) 'haskell-definition-face))) ((1 (unless (member (match-string 1) '("\\" "=" "->" "→" "<-" "←" "::" "∷" "," ";" "`")) 'haskell-definition-face))) ("(\\(,*\\|->\\))" 0 'haskell-constructor-face) ("\\[\\]" 0 'haskell-constructor-face) ("`" (0 (if (or (elt (syntax-ppss) 3) (elt (syntax-ppss) 4)) (parse-partial-sexp (point) (point-max) nil nil (syntax-ppss) 'syntax-table) (when (save-excursion (goto-char (match-beginning 0)) (haskell-lexeme-looking-at-backtick)) (goto-char (match-end 0)) (unless (text-property-not-all (match-beginning 1) (match-end 1) 'face nil) (put-text-property (match-beginning 1) (match-end 1) 'face 'haskell-operator-face)) (unless (text-property-not-all (match-beginning 2) (match-end 2) 'face nil) (put-text-property (match-beginning 2) (match-end 2) 'face 'haskell-operator-face)) (unless (text-property-not-all (match-beginning 4) (match-end 4) 'face nil) (put-text-property (match-beginning 4) (match-end 4) 'face 'haskell-operator-face)) (add-text-properties (match-beginning 0) (match-end 0) '(font-lock-fontified t fontified t font-lock-multiline t)))))) ((0 (if (or (elt (syntax-ppss) 3) (elt (syntax-ppss) 4)) (parse-partial-sexp (point) (point-max) nil nil (syntax-ppss) 'syntax-table) (when (save-excursion (goto-char (match-beginning 0)) (haskell-lexeme-looking-at-qidsym)) (goto-char (match-end 0)) (haskell-font-lock--put-face-on-type-or-constructor)))))] 25 (#$ . 11793)]) #@57 Fontify a block as LANG-MODE. (fn LANG-MODE START END) (defalias 'haskell-font-lock-fontify-block #[771 "\301\"\302 p\303\211\304\305#\210r\306\307\310\n!P!q\210ed|\210\311\261\210\312\313K\314\315\"\216\313M\210\n=\204< \210\316 \210)\266e\262\317\320\"\211\262\203n\321S\\\\S\320\322\320\"\206d\323%\210\211\262\202Ed\232\204\205\321S\\d\\S\320\323%\210)\324\325#\210\326!\207" [major-mode buffer-substring-no-properties buffer-modified-p nil remove-text-properties (face nil) get-buffer-create " haskell-font-lock-fontify-block:" symbol-name " " #[385 "\300\207" [nil] 3 "\n\n(fn FMT &rest ARGS)"] message make-closure #[0 "\301\300M\207" [V0 message] 2] font-lock-ensure next-single-property-change face put-text-property get-text-property default add-text-properties (font-lock-fontified t fontified t font-lock-multiline t) set-buffer-modified-p] 15 (#$ . 15562)]) #@62 `font-lock-syntactic-face-function' for Haskell. (fn STATE) (defalias 'haskell-syntactic-face-function #[257 "\3038\203\260\3038\304=\203O\212\3058b\210\306\307!\210\310`\3058\")\311\312!\"A\211\203K\313!\203K\212\314`d\315\211\316&\210\317\3058T`S#\210)\266\315\207\266\320\207\212\314`d\315\211\316&`\321\3058`\322\323$\210\3038\324=\204q\3038\203}\321\3058\3058T\322\325$\210\3058Tb\210\326\327\324#\203\253`Sb\210\330 !\203\234\331\225b\210\202\203\321``T\322\325$\210`Tb\210\202\203\266)\315\207\212\3058b\210\332`!\333\232)\203\301\334\207\212\3058b\210\335\324\330!)\262\205\351\336\337!\205\351`\303Zb\205\351\340\324\330!)\262)\203\357\341\207\212\3058b\210\342\324\330!)\262\205\336\337!\205`\303Zb\205\343\324\330!)\262)\203\344\207\212\3058b\210\345\324\330!)\262\206Z\346\324\330!)\262\205Z\347y\205Z\350\351 \322\"\352=\205Z\315y\205Z\353\354!\205Z`\3058=)\203\335\3058\212\314`d\315\211\316&\210`)\315\211\321\322\352$\210\313\355!\203\331\212`W\203\330\330\356!\203\315\357\331!\360\232\203\252\203\244\355\331\225\361#\210\315\262\202\306`\262\202\306\357\331!\362\232\203\306\211\203\303\355\331\225\363#\210\315\262\202\306`\262\331\225b\210\202`Tb\210\364w\210\202)\266\315\207\365\207" [haskell-font-lock-quasi-quote-modes haskell-lexeme-string-literal-inside-item inhibit-changing-match-data 3 124 8 skip-syntax-backward "w._" buffer-substring-no-properties assoc haskell-string-drop-qualifier fboundp parse-partial-sexp nil syntax-table haskell-font-lock-fontify-block haskell-quasi-quote-face put-text-property face font-lock-string-face t font-lock-warning-face re-search-forward "\\\\" looking-at 0 syntax-after (11) haskell-literate-comment-face "{-#" forward-comment 1 "#-}" haskell-pragma-face "{-@" "@-}" haskell-liquid-haskell-annotation-face "\\(?:{- ?\\|-- \\)[|^*$]" "--" -1 get-text-property line-end-position font-lock-doc-face skip-syntax-forward "-" add-face-text-property "__\\|\\\\.\\|\\\n\\|[/]" match-string "/" (:slant italic) "__" (:weight bold) "^_\\\\/" font-lock-comment-face] 10 (#$ . 16488)]) #@47 Locally set `font-lock-defaults' for Haskell. (defalias 'haskell-font-lock-defaults-create #[0 "\301\300!\210\302\211\207" [font-lock-defaults make-local-variable ((haskell-font-lock-keywords) nil nil nil nil (font-lock-syntactic-face-function . haskell-syntactic-face-function) (parse-sexp-lookup-properties . t) (font-lock-extra-managed-props composition))] 2 (#$ . 18644)]) #@69 Fontify TEXT as MODE, returning the fontified text. (fn TEXT MODE) (defalias 'haskell-fontify-as-mode #[514 "\300\301\302\"r\211q\210\303\304\"\216 \210c\210\305\306!\203\306 \210\202\"\307 \210ed{*\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] fboundp font-lock-ensure font-lock-fontify-buffer] 6 (#$ . 19028)]) (provide 'haskell-font-lock)