;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310\311\312\313\314& \210\315\316\317\320\321DD\322\323\324\325\326\307\304& \210\315\327\317\320\330DD\331\323\324\325\326\307\304& \210\315\332\317\320\333DD\334\323\324\325\326\307\304& \207" [require cl-lib haskell-string custom-declare-group haskell-indent nil "Haskell indentation." :group haskell :link (custom-manual "(haskell-mode)Indentation") :prefix "haskell-indent-" custom-declare-variable haskell-indent-offset funcall function #[0 "\300\207" [4] 1] "Indentation of Haskell statements with respect to containing block." :type integer :safe natnump haskell-indent-literate-Bird-default-offset #[0 "\300\207" [1] 1] "Default number of blanks after > in a Bird style literate script." haskell-indent-rhs-align-column #[0 "\300\207" [0] 1] "Column on which to align right-hand sides (use 0 for ad-hoc alignment)."] 10) #@50 Return the column number of APOINT. (fn APOINT) (defalias 'haskell-indent-point-to-col #[257 "\212\211b\210i)\207" [] 2 (#$ . 976)]) #@76 Regexp for keywords to complete when standing at the first word of a line. (defconst haskell-indent-start-keywords-re "\\<\\(class\\|data\\|i\\(?:mport\\|n\\(?:fix[lr]?\\|stance\\)\\)\\|\\(?:modul\\|newtyp\\|primitiv\\|signatur\\|typ\\)e\\)\\>" (#$ . 1116)) (defalias 'haskell-indent-mark-active #[0 "\207" [mark-active] 1]) #@218 Push indentation information for the column COL. The info is followed by NAME (if present). Makes sure that the same indentation info is not pushed twice. Uses free var `haskell-indent-info'. (fn COL &optional NAME) (defalias 'haskell-indent-push-col #[513 "B\211\235\203 \207\211B\211\207" [haskell-indent-info] 5 (#$ . 1449)]) #@94 Push indentation information for POS followed by NAME (if present). (fn POS &optional NAME) (defalias 'haskell-indent-push-pos #[513 "\300\301!\"\207" [haskell-indent-push-col haskell-indent-point-to-col] 5 (#$ . 1792)]) #@22 (fn COLUMN OFFSET) (defalias 'haskell-indent-column+offset #[514 "\211\204\262\\\262\207" [haskell-indent-offset] 4 (#$ . 2022)]) #@183 Pushes indentation information for the column corresponding to POS followed by an OFFSET (if present use its value otherwise use `haskell-indent-offset'). (fn POS &optional OFFSET) (defalias 'haskell-indent-push-pos-offset #[513 "\300\301\302!\"!\207" [haskell-indent-push-col haskell-indent-column+offset haskell-indent-point-to-col] 6 (#$ . 2169)]) #@54 `bolp' but dealing with Bird-style literate scripts. (defalias 'haskell-indent-bolp #[0 "n\206\302=\205i TX\205\303 f\304=\207" [haskell-literate haskell-indent-literate-Bird-default-offset bird line-beginning-position 62] 2 (#$ . 2529)]) #@69 Checks if the current line is empty; deals with Bird style scripts. (defalias 'haskell-indent-empty-line-p #[0 "\212\301 \210\302=\203g\303=\203\304u\210\305\306!)\207" [haskell-literate beginning-of-line bird 62 1 looking-at "[ ]*$"] 2 (#$ . 2781)]) #@78 `back-to-indentation' function but dealing with Bird-style literate scripts. (defalias 'haskell-indent-back-to-indentation #[0 "\301=\203\302 \210g\303=\203\304u\210\305\306w\207\307 \207" [haskell-literate bird beginning-of-line 62 1 " " nil back-to-indentation] 2 (#$ . 3044)]) #@74 `current-indentation' function dealing with Bird-style literate scripts. (defalias 'haskell-indent-current-indentation #[0 "\301=\203 \212\302 \210i)\207\303 \207" [haskell-literate bird haskell-indent-back-to-indentation current-indentation] 2 (#$ . 3336)]) #@86 `backward-to-indentation' function dealing with Bird-style literate scripts. (fn N) (defalias 'haskell-indent-backward-to-indentation #[257 "\301=\203 \211[y\210\302 \207\303!\207" [haskell-literate bird haskell-indent-back-to-indentation backward-to-indentation] 3 (#$ . 3603)]) #@89 `forward-line' function but dealing with Bird-style literate scripts. (fn &optional N) (defalias 'haskell-indent-forward-line #[256 "\211y\301=\203g\302=\203\303u\210\304\305w\210\207" [haskell-literate bird 62 1 " " nil] 4 (#$ . 3893)]) #@81 `indent-line-to' function but dealing with Bird-style literate scripts. (fn N) (defalias 'haskell-indent-line-to #[257 "\301=\203,\302 \210g\303=\203\304\305!\210\306 \210\307!\210\212\302 \210\211\310V\203(\304\305!\210\303c)\207\307!\207" [haskell-literate bird beginning-of-line 62 delete-char 1 delete-horizontal-space indent-line-to 0] 3 (#$ . 4144)]) #@106 Skip forward blanks, tabs and newlines until END. Take account of Bird-style literate scripts. (fn END) (defalias 'haskell-indent-skip-blanks-and-newlines-forward #[257 "\301w\210\302=\205n\205g\303=\205\304u\210\301w\210\202\n\207" [haskell-literate " \n" bird 62 1] 3 (#$ . 4516)]) #@111 Skip backward blanks, tabs and newlines up to START. Take account of Bird-style literate scripts. (fn START) (defalias 'haskell-indent-skip-blanks-and-newlines-backward #[257 "\301x\210\302=\205 i\303=\205 h\304=\205 \305u\210\301x\210\202\n\207" [haskell-literate " \n" bird 1 62 -1] 3 (#$ . 4819)]) #@216 Check if point is within a part of literate Haskell code. If so, return its start; otherwise return nil: If it is Bird-style, then return the position of the >; otherwise return the ending position of \begin{code}. (defalias 'haskell-indent-within-literate-code #[0 "\212\301\267\202F\302 \210g\303=\204n\205I\304y\205Ig\303=\205I\304y\305U\203,g\303=\204g\303=\2045\306y\210`\202I\307\310\306\311#\205I\312\225\202I\313\314!)\207" [haskell-literate #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (bird 7 latex 57 tex 57)) beginning-of-line 62 -1 0 nil re-search-backward "^\\(\\\\begin{code}$\\)\\|\\(\\\\end{code}$\\)" t 1 error "haskell-indent-within-literate-code: should not happen!"] 4 (#$ . 5136)]) #@209 Put lines of the region as a piece of literate code. With prefix arg, remove indication that the region is literate code. It deals with both Bird style and non Bird-style scripts. (fn BEG END &optional ARG) (defalias 'haskell-indent-put-region-in-literate #[770 "\204\306\307!\210\310=\203\311\312\313\314\315\316#-\207\211\203H\212b\210\317\320\321\322!\323#\2037`\321\324!|\210b\210\325 \210\326\327!\205F\330\331!)\207\212b\210n\204S\332 \210\333c\210b\210n\204`\332 \210\334c)\207" [haskell-literate comment-style comment-end-skip comment-end comment-start-skip comment-start error "Cannot put a region in literate in a non literate script" bird "> " "^> ?" "" "\n" plain comment-region re-search-backward "^\\\\end{code}[ \n]*\\=" line-beginning-position -2 t 2 beginning-of-line looking-at "\\\\begin{code}" kill-line 1 newline "\\end{code}\n" "\\begin{code}\n"] 8 (#$ . 5901) "r\nP"]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable haskell-indent-look-past-empty-line funcall function #[0 "\300\207" [t] 1] "If nil, indentation engine will not look past an empty line for layout points." :group haskell-indent :safe booleanp :type boolean] 10) #@259 Return the position of the start of a definition. The start of a def is expected to be recognizable by starting in column 0, unless `haskell-indent-look-past-empty-line' is nil, in which case we take a coarser approximation and stop at the first empty line. (defalias 'haskell-indent-start-of-def #[0 "\212\205\302 \303=\203\304\202\305`\203T\202e\262\306\307!\210 \2033\310 V\204@\311 \202=\310 V\203N\311 ?\203N`V\203N\306\307!\305U\204#\311 \203W\306\312!\210`\262\313d!\210`V\203j\266\203\202m`\266\203)\207" [haskell-literate haskell-indent-look-past-empty-line haskell-indent-within-literate-code bird 2 0 haskell-indent-forward-line -1 haskell-indent-current-indentation haskell-indent-empty-line-p 1 forward-comment] 5 (#$ . 7132)]) #@147 If any structure (list or tuple) is not closed, between START and END, returns the location of the opening symbol, nil otherwise. (fn START END) (defalias 'haskell-indent-open-structure #[514 "\212\300\"A@)\207" [parse-partial-sexp] 5 (#$ . 7911)]) #@127 If a string is not closed , between START and END, returns the location of the opening symbol, nil otherwise. (fn START END) (defalias 'haskell-indent-in-string #[514 "\212\300\"\3018\205\3028\262)\207" [parse-partial-sexp 3 8] 5 (#$ . 8170)]) #@144 Check, starting from START, if END is at or within a comment. Returns the location of the start of the comment, nil otherwise. (fn START END) (defalias 'haskell-indent-in-comment #[514 "\300U\203 \300\207\301\212\302\"\211\262)8\203\3038\207\3038?\205=d\304\\Y\205=\301\212\302\211\304\\\"\211\262)8\205=\3038\207" [nil 4 parse-partial-sexp 8 2] 8 (#$ . 8429)]) (defvar haskell-indent-off-side-keywords-re "\\<\\(do\\|let\\|of\\|where\\|mdo\\|rec\\)\\>[ ]*") #@70 Return the type of the line (also puts information in `match-data'). (defalias 'haskell-indent-type-at-point #[0 "\300 \203\301\207\302e`\"\203\303\207\304\305!\203\306\207\304\307!\203 \310\207\304\311!\203(\312\207\313\207" [haskell-indent-empty-line-p empty haskell-indent-in-comment comment looking-at "\\(\\([[:alpha:]]\\(\\sw\\|'\\)*\\)\\|_\\)[ \n]*" ident "\\(|[^|]\\)[ \n]*" guard "\\(=[^>=]\\|::\\|∷\\|→\\|←\\|->\\|<-\\)[ \n]*" rhs other] 3 (#$ . 8913)]) #@76 Global variable that keeps track of the first ident of the line to indent. (defvar haskell-indent-current-line-first-ident "" (#$ . 9400)) #@76 Generate contour information between START and END points. (fn START END) (defalias 'haskell-indent-contour-line #[514 "W\205S\212\211b\210\300!\210i\301\302\301V\203P\301U\203P`Y\203P\303 \210`W\203/b\210\304 \305>\204HiW\203H`B\211\262\203Hi\262\306\307!\262\202\266\202)\207" [haskell-indent-skip-blanks-and-newlines-backward 0 nil haskell-indent-back-to-indentation haskell-indent-type-at-point (empty comment) haskell-indent-forward-line -1] 7 (#$ . 9545)]) #@42 Move point to the next symbol. (fn END) (defalias 'haskell-indent-next-symbol #[257 "\300\301\"\210`W\205\302\303!\210\304!\207" [skip-syntax-forward ")" forward-sexp 1 haskell-indent-skip-blanks-and-newlines-forward] 4 (#$ . 10038)]) #@104 Puts point to the next following symbol, or to end if there are no more symbols in the sexp. (fn END) (defalias 'haskell-indent-next-symbol-safe #[257 "\3001 \301!0\207b\207" [(error) haskell-indent-next-symbol] 3 (#$ . 10286)]) #@77 Return a list of positions for important parts of a valdef. (fn START END) (defalias 'haskell-indent-separate-valdef #[514 "\212\300\211\211\211\211\211\211\211 b\210\301 \262\211\302>\203^\211\303=\203-\304\224\262\305\304!\262\304\225b\210\202:\306 w\210`\262\307 !\210` W\203^\301 \211\262\203^\211\310>\203^\204V`\262\307 !\210\202:` W\203\227\211\311=\203\227\304\224\262\304\225b\210` W\203\227\301 \211\262\203\227\211\312=\204\227\204\217`\262\307 !\210\202s` W\203\266\211\312=\203\266\304\224\262\304\225b\210` W\203\266`\262\257\266\210)\207" [nil haskell-indent-type-at-point (ident other) ident 0 match-string " " haskell-indent-next-symbol-safe (ident other) guard rhs] 17 (#$ . 10525)]) #@54 Check if there is no otherwise at GUARD. (fn GUARD) (defalias 'haskell-indent-no-otherwise #[257 "\212\211b\210\300\301!)?\207" [looking-at "|[ ]*otherwise\\>"] 3 (#$ . 11291)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put haskell-indent-no-otherwise speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@104 Find indentation information for a line starting with a guard. (fn START END END-VISIBLE INDENT-INFO) (defalias 'haskell-indent-guard #[1028 "\212\211\301\"\211@\3028\3038\2030W\2030\212\211b\210\304\305!)?\262\2030\306!\210\202C\211\203;\306!\210\202C\203C\307!\210)\266\204)\207" [haskell-indent-info haskell-indent-separate-valdef 3 5 looking-at "|[ ]*otherwise\\>" haskell-indent-push-pos haskell-indent-push-pos-offset] 11 (#$ . 11631)]) #@102 Find indentation information for a line starting with a rhs. (fn START END END-VISIBLE INDENT-INFO) (defalias 'haskell-indent-rhs #[1028 "\212\211\301\"\211@\3028\3038\211\203!\211W\203!\304!\210\202;\2033W\2033\305!\210\202;\203;\305!\210)\266\204)\207" [haskell-indent-info haskell-indent-separate-valdef 3 5 haskell-indent-push-pos haskell-indent-push-pos-offset] 10 (#$ . 12106)]) (defconst haskell-indent-decision-table "\\(1.1.11\\)\\|\\(1.1.10\\)\\|\\(1.1100\\)\\|\\(1.1000\\)\\|\\(1.0011\\)\\|\\(1.0010\\)\\|\\(110000\\)\\|\\(100000\\)\\|\\(001.11\\)\\|\\(001.10\\)\\|\\(001100\\)\\|\\(001000\\)\\|\\(000011\\)\\|\\(000010\\)\\|\\(000000\\)") #@68 Find the index that matches TEST in the decision table. (fn TEST) (defalias 'haskell-indent-find-case #[257 "\301\"\203\302\303!G\304\245S\207\305\306\"\207" [haskell-indent-decision-table string-match match-data integers 2 error "haskell-indent-find-case: impossible case: %s"] 4 (#$ . 12787)]) #@84 Find indentation points for an empty line. (fn START END END-VISIBLE INDENT-INFO) (defalias 'haskell-indent-empty #[1028 "\212\211\302\"\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\n\nU\303\203A\304\202B\305\203S W\203S\304\202T\305\203eW\203e\304\202f\305\203wW\203w\304\202x\305\203\211W\203\211\304\202\212\305\203\233W\203\233\304\202\234\305&\203\323\306  \"\203\323\307 !\210\306\310 \"\203\313\203\303\307!\210\202h\311 !\210\202h\311 !\210\202h\312!\211\313\267\202b\307\n!\210\307\n\n\"\210\212\211b\210\314\315!)?\262\203\376\307\316\"\210\307!\266\202h\307\n!\210\307\n\n\"\210\203\311!\266\202h\212\211b\210\314\315!)?\262\2035\307\316\"\210\210\202h\307\n!\210\307!\210\203g\311\n!\266\202h\307\n!\210\203g\311\317\"\266\202h\307\n!\210\203tf\320U\204{f\321U\203\202\307\n\n\"\210\307!\266\202h\307\n!\210\307\n\n\"\210\203g\311\n!\266\202h\307\n!\210\203\265\307!\266\202h\307\n\n\"\266\202h\307\n!\266\202h\212\211b\210\314\315!)?\262\203\337\307\316\"\210\307!\266\202h\212\211b\210\314\315!)?\262\203\375\307\316\"\210\203g\311!\266\202h\212\211b\210\314\315!)?\262\203 \307\316\"\210\307!\266\202h\212\211b\210\314\315!)?\262\203?\307\316\"\210\203g\311\317\"\266\202h\307!\266\202h\203g\311\317\"\266\202h\322\323\"\210\210)\266\212)\207" [haskell-indent-info haskell-indent-start-keywords-re haskell-indent-separate-valdef string 49 48 string-match haskell-indent-push-pos "\\" haskell-indent-push-pos-offset haskell-indent-find-case #s(hash-table size 14 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (1 220 2 262 3 313 4 336 5 355 6 394 7 419 8 448 9 457 10 487 11 522 12 553 13 589 14 597)) looking-at "|[ ]*otherwise\\>" "| " 2 61 58 error "haskell-indent-empty: %s impossible case"] 21 (#$ . 13095)]) #@105 Find indentation points for a line starting with an identifier. (fn START END END-VISIBLE INDENT-INFO) (defalias 'haskell-indent-ident #[1028 "\212\211\303\"\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\n\nU\304\305 \"?\206J\306!\306 !\230?\307\n\203T\310\202U\311 \203f W\203f\310\202g\311 \203x W\203x\310\202y\311 \203\212 W\203\212\310\202\213\311 \203\234 W\203\234\310\202\235\311 \203\256 W\203\256\310\202\257\311& \203\355\304\n \"\203\355\312 !\210\304\313 \"\203\336\203\326\312!\210\202z\314 !\210\202z\304\n \"\204z\314 !\210\202z \315\230\203\n\203z\312 !\210\202z\316!\211\317\267\202t\203\312 !\266\202z\312\f!\210\203$\312!\210\210\202z\2035\312 !\266\202z\312\f!\210\203C\314 !\210\210\202z\203T\314 !\266\202z\312\f!\210\203b\312!\210\210\202z\203s\312 !\266\202z\312\f!\210\203\202\314 \320\"\210\210\202z\203\223\314\f!\266\202z\312\f!\210\203\241\312!\210\210\202z\203\262\314\f!\266\202z\312\f!\210\203\300\314\f!\210\210\202z\203\321\314\f!\266\202z\312\f!\210\203\337\312\n!\210\210\202z\203\360\314\f!\266\202z\312\f!\266\202z\203\312 !\266\202z\312!\266\202z\203\312 !\266\202z\203%\314 !\210\210\202z\2036\312 !\266\202z\212\211b\210\321\322!)?\262\203K\312!\210\210\202z\203y\314 \320\"\266\202z\312!\266\202z\203y\314\320\"\266\202z\323\324\"\210\210)\266\214)\207" [haskell-indent-info haskell-indent-current-line-first-ident haskell-indent-start-keywords-re haskell-indent-separate-valdef string-match "where[ ]*" haskell-string-trim string 49 48 haskell-indent-push-pos "\\" haskell-indent-push-pos-offset "::" haskell-indent-find-case #s(hash-table size 14 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (1 265 2 296 3 327 4 358 5 390 6 421 7 452 8 483 9 505 10 527 11 553 12 591 13 605 14 614)) 2 looking-at "|[ ]*otherwise\\>" error "haskell-indent-ident: %s impossible case"] 23 (#$ . 15122)]) #@152 Find indentation points for a non-empty line starting with something other than an identifier, a guard or rhs. (fn START END END-VISIBLE INDENT-INFO) (defalias 'haskell-indent-other #[1028 "\212\211\302\"\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\n\nU\303\203A\304\202B\305\203S W\203S\304\202T\305\203eW\203e\304\202f\305\203wW\203w\304\202x\305\203\211W\203\211\304\202\212\305\203\233W\203\233\304\202\234\305&\203\263\306  \"\203\263\307 !\210\202\202\310!\211\311\267\202|\312!\266\202\202\203\321\307!\266\202\202\307\313\"\266\202\202\312!\266\202\202\307\313\"\266\202\202\312\n!\210\312!\266\202\202\203\307\n!\266\202\202\307\313\"\266\202\202\307!\266\202\202\312\n!\266\202\202\312!\266\202\202\2037\307!\266\202\202\307\313\"\266\202\202\212\211b\210\314\315!)?\262\203\201\312!\266\202\202\203\201\307\313\"\266\202\202\312!\266\202\202\203\201\307\313\"\266\202\202\316\317\"\210\210)\266\212)\207" [haskell-indent-info haskell-indent-start-keywords-re haskell-indent-separate-valdef string 49 48 string-match haskell-indent-push-pos-offset haskell-indent-find-case #s(hash-table size 14 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (1 188 2 196 3 218 4 227 5 237 6 250 7 272 8 281 9 290 10 298 11 320 12 345 13 359 14 367)) haskell-indent-push-pos 2 looking-at "|[ ]*otherwise\\>" error "haskell-indent-other: %s impossible case"] 21 (#$ . 17253)]) #@109 Find indentation information for a value definition. (fn START END END-VISIBLE CURR-LINE-TYPE INDENT-INFO) (defalias 'haskell-indent-valdef-indentation #[1285 "\211W\203E\301\267\202A\302$\202F\303$\202F\304$\202F\305$\202F\306\307!\202F\310$\202F\311\202F)\207" [haskell-indent-info #s(hash-table size 6 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (empty 14 ident 23 guard 32 rhs 41 comment 50 other 56)) haskell-indent-empty haskell-indent-ident haskell-indent-guard haskell-indent-rhs error "Comment indent should never happen" haskell-indent-other nil] 10 (#$ . 18849)]) #@233 Compute indentation info between LINE-START and END-VISIBLE. Separate a line of program into valdefs between offside keywords and find indentation info for each part. (fn LINE-START LINE-END END-VISIBLE CURR-LINE-TYPE INDENT-INFO) (defalias 'haskell-indent-line-indentation #[1285 "\212\211\302\"\206\303\"\211\203\211\262\304 \305#\203f\302`\"\204f\303`\"\204f\306\224\306\225W\204Ef\307=\203P\310   %U\203[\311!\210\211\262 b\266\202\310%)\266\202)\207" [haskell-indent-info haskell-indent-off-side-keywords-re haskell-indent-in-comment haskell-indent-in-string re-search-forward t 0 108 haskell-indent-valdef-indentation haskell-indent-push-pos] 15 (#$ . 19486)]) #@27 (fn START CONTOUR-LINE) (defalias 'haskell-indent-layout-indent-info #[514 "\302\303 \302\211\211\212\304=\203?\305`\306 \"\307\310A@\"\203#\211A@\202=\3118\203<\3118f\312U\2036\313\202=\211A@\202=\314\210\203\203\211A\262\242\262b\210\306 \262\203d\212\315\316@!!\210`)\202e\262\317\"\204?\320\"\204?\321%\202?))\207" [haskell-indent-info haskell-indent-current-line-first-ident nil haskell-indent-type-at-point ident haskell-indent-separate-valdef line-end-position string-match "where[ ]*" 5 58 "::" "" move-to-column haskell-indent-point-to-col haskell-indent-open-structure haskell-indent-in-comment haskell-indent-line-indentation] 13 (#$ . 20215)]) #@42 (fn REGEXP LIMIT &optional PRED START) (defalias 'haskell-indent-find-matching-start #[1026 "\300`\"\211\203\f\211T\262\210\211\204`\262\301\302#\205m\303\225\304`\"\206>\305`\"\206>\300`\"\206>\205>!\205>`\211\203P\211b\210\306$\207\203j\306#\205k\306$\207`\266\202\207" [haskell-indent-open-structure re-search-backward t 1 haskell-indent-in-string haskell-indent-in-comment haskell-indent-find-matching-start] 11 (#$ . 20925)]) #@122 Return non-nil if point is in front of a `let' that has no `in'. START is the position of the presumed `in'. (fn START) (defalias 'haskell-indent-filter-let-no-in #[257 "\300\301!\205K\3021I\212\303v\210\304d!\210\300\305!\203&\306\303!\210\304d!\210`W\202Fi\303y\210\307 \210`W\203BiW\203'\310\262b\210\202'\211?\262)0\207\210\310\207" [looking-at "let" (error) 1 forward-comment "{" forward-sexp haskell-indent-back-to-indentation nil] 4 (#$ . 21411)]) #@138 Compute indent info for comments and text inside comments. OPEN is the start position of the comment in which point is. (fn OPEN START) (defalias 'haskell-indent-comment #[514 "\212`U\203G\301f\302=\203\301\202)\303\304!\203(\305\306!V\203(\307`!CC\202)\301\303d!\210\310\212\311!)i\312\313\314\"\"\262\266\202\"\262\202\231\315\316!\203]\317u\210\303\304!\210\307`!TCC\202\231\315\320!\205h\321\224\321\225Z\304y\210\322 \210`W\203wb\210\315!\203\222\211\203\213\317\\\307`!\\\202\225\307\321\225!\202\225\307`!CC\262)\207" [comment-start-skip nil 123 forward-comment -1 line-beginning-position 3 haskell-indent-point-to-col append haskell-indent-indentation-info sort make-closure #[514 "\301\300@Z!\301\300@Z!X\207" [V0 abs] 6 "\n\n(fn X Y)"] looking-at "-}" 2 "--?" 0 haskell-indent-back-to-indentation] 12 (#$ . 21887)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable haskell-indent-thenelse funcall function #[0 "\300\207" [0] 1] "If non-nil, \"then\" and \"else\" are indented.\nThis is necessary in the \"do\" layout under Haskell-98.\nSee http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse" :group haskell-indent :safe booleanp :type integer] 10) #@14 (fn START) (defalias 'haskell-indent-closing-keyword #[257 "\212\301\302f\211\303\267\202\304\202\305\202\306\202\307\202\302\262\302f\310=\205&\311#)\212\211b\210\312 \2036\313!\262)\302f\314>\203B\202C\315\316!\\CC\207" [haskell-indent-thenelse haskell-indent-find-matching-start nil #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (105 10 111 14 116 18 101 22)) "\\<\\(?:\\(in\\)\\|let\\)\\>" "\\<\\(?:\\(of\\)\\|case\\)\\>" "\\<\\(?:\\(then\\)\\|if\\)\\>" "\\<\\(?:\\(else\\)\\|if\\)\\>" 105 haskell-indent-filter-let-no-in haskell-indent-hanging-p haskell-indent-virtual-indentation (116 101) 0 haskell-indent-point-to-col] 6 (#$ . 23146)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable haskell-indent-after-keywords funcall function #[0 "\300\207" [(("where" 2 0) ("of" 2) ("do" 2) ("mdo" 2) ("rec" 2) ("in" 2 0) ("{" 2) "if" "then" "else" "let")] 1] "Keywords after which indentation should be indented by some offset.\nEach keyword info can have the following forms:\n\n KEYWORD | (KEYWORD OFFSET [OFFSET-HANGING])\n\nIf absent OFFSET-HANGING defaults to OFFSET.\nIf absent OFFSET defaults to `haskell-indent-offset'.\n\nOFFSET-HANGING is the offset to use in the case where the keyword\nis at the end of an otherwise-non-empty line." :group haskell-indent :type (repeat (choice string (cons :tag #1="" (string :tag "keyword:") (cons :tag #1# (integer :tag "offset") (choice (const nil) (list :tag #1# (integer :tag "offset-pending")))))))] 8) (defalias 'haskell-indent-skip-lexeme-forward #[0 "\300\301!\302U\205\300\303!\205\300\304!\205\300\305!\207" [skip-syntax-forward "w" 0 "_" "(" ")"] 2]) (defvar haskell-indent-inhibit-after-offset nil) #@76 Return the info from `haskell-indent-after-keywords' for keyword at point. (defalias 'haskell-indent-offset-after-info #[0 "`\212\301 \210`){\302\"\206\211\235@\207" [haskell-indent-after-keywords haskell-indent-skip-lexeme-forward assoc] 4 (#$ . 24915)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable haskell-indent-dont-hang funcall function #[0 "\300\207" [("(")] 1] "Lexemes that should never be considered as hanging." :group haskell-indent :type (repeat string)] 8) (defalias 'haskell-indent-hanging-p #[0 "i\301 U\206\212`\302 \210`{\211\235\206\303 \304d!\210`V\262)?\207" [haskell-indent-dont-hang haskell-indent-current-indentation haskell-indent-skip-lexeme-forward line-end-position forward-comment] 4]) #@44 (fn OFFSET-INFO START &optional DEFAULT) (defalias 'haskell-indent-after-keyword-column #[770 "\204\302 \262\211\204\262 \203\303\202\243\262\304 \204*\305i@\206(\"\207\305\306!A@\206:@\206:\"\207" [haskell-indent-offset haskell-indent-inhibit-after-offset haskell-indent-offset-after-info (0) haskell-indent-hanging-p haskell-indent-column+offset haskell-indent-virtual-indentation] 6 (#$ . 25689)]) #@13 (fn OPEN) (defalias 'haskell-indent-inside-paren #[257 "\300\301!\203L\302f\303=\203\211f\304=\204\"\302f\305=\2036\211f\306=\2036\307\310\302fff\304=\2033\311\2024\312$\210\212\211b\210\313 \203E\314\302!\202H\315!)CC\207`\300\316!\203Y\315!\202|\212Tb\210\317!\210`)\211U\203w\212b\210\320\302\211\321#)\202z\315!\262\315!\322T\"\211\204\214CC\207\323T\"\324\"\211\203\244\211\240\210\211\302\241\210\202\255\325CC\"\262\207" [looking-at "\\s)\\|[;,]" nil 59 40 44 123 message "Mismatched punctuation: `%c' in %c...%c" 41 125 haskell-indent-hanging-p haskell-indent-virtual-indentation haskell-indent-point-to-col "\\s.\\|\\$ " haskell-indent-skip-blanks-and-newlines-forward haskell-indent-after-keyword-column 1 haskell-indent-contour-line haskell-indent-layout-indent-info assoc append] 10 (#$ . 26122)]) #@184 Compute the "virtual indentation" of text at point. The "virtual indentation" is the indentation that text at point would have had, if it had been placed on its own line. (fn START) (defalias 'haskell-indent-virtual-indentation #[257 "i\301 \212\302\303x\210n)\203\211\202G\304!\305\211\2037\211@\211@\262\211V\2030\211Y\2040\211\262A\266\202\202\210\211\306Y\203D\211\266\202\202G\266\202)\207" [haskell-indent-inhibit-after-offset haskell-indent-hanging-p " " nil haskell-indent-indentation-info -1 0] 8 (#$ . 26982)]) #@199 Return a list of possible indentations for the current line. These are then used by `haskell-indent-cycle'. START if non-nil is a presumed start pos of the current definition. (fn &optional START) (defalias 'haskell-indent-indentation-info #[256 "\211\204\302 \262\303\211\304`\"\211\262\203&\305!\306\307!\203!\310\202\"\311\\CC\207\312`\"\211\262\2035\313\"\207\306\314!\203?\315!\207\212\316d[!\210\317\320!\310U?\205\\\321 \211\262\205\\\322\"CC)\206\225\323`\"\211\262\203n\324!\207\325`\"\211\262\203}\326\"\207\327=\203\220\305!\311=\203\220 T\202\223\305!CC\207" [haskell-literate haskell-indent-literate-Bird-default-offset haskell-indent-start-of-def nil haskell-indent-in-string haskell-indent-point-to-col looking-at "\\\\" 0 1 haskell-indent-in-comment haskell-indent-comment "\\(?:in\\|of\\|then\\|else\\)\\>" haskell-indent-closing-keyword forward-comment skip-syntax-backward "w" haskell-indent-offset-after-info haskell-indent-after-keyword-column haskell-indent-open-structure haskell-indent-inside-paren haskell-indent-contour-line haskell-indent-layout-indent-info bird] 6 (#$ . 27531)]) (defvar haskell-indent-last-info nil) #@76 Indentation cycle. We stay in the cycle as long as the TAB key is pressed. (defalias 'haskell-indent-cycle #[0 "\203\304 \204\305\306! \207i\307 V\205\310 \311 \210`\312 \210 \n=\203+\211 @=\2044\212\211\313 \314\211F) A@\315 8\316 88\317@!\210\320!\210\314\262\211A\211\203Y\211c\210\211G\262\210TG\246FG\321U\203s\322\323!\210\202y\322\324G\"\210\205\202\325!b\207" [haskell-literate last-command this-command haskell-indent-last-info haskell-indent-within-literate-code default-value indent-line-function haskell-indent-current-indentation point-marker beginning-of-line haskell-indent-back-to-indentation haskell-indent-indentation-info 0 2 3 haskell-indent-line-to delete-char 1 message "Sole indentation" "Indent cycle (%d)..." marker-position] 10 (#$ . 28721) "*"]) #@18 (fn START END) (defalias 'haskell-indent-region #[514 "\300\301!\207" [error "Auto-reindentation of a region is not supported"] 4 (#$ . 29532)]) #@175 Shift columns in REGION-STACK to go to DEST-COLUMN. Elements of the stack are pairs of points giving the start and end of the regions to move. (fn DEST-COLUMN REGION-STACK) (defalias 'haskell-indent-shift-columns #[514 "\300\211\211\211\211A\262\242\211\262\205`\301A!\262@b\210i\262Z\262\302U\204\3032\\`\304!X\205[\302W\203C\305[\300\"\210\202H\306\307\"\210\310\210m\203T\311\303\300\"\210\312!\210\202,0\210\202\207" [nil copy-marker 0 end-of-buffer marker-position backward-delete-char-untabify insert-char 32 2 throw move-to-column] 9 (#$ . 29686)]) #@158 Align guards or rhs within the current definition before point. If P-ARG is t align all defs up to the mark. TYPE is either 'guard or 'rhs. (fn P-ARG TYPE) (defalias 'haskell-indent-align-def #[514 "\212\301\211\302=\203 \202\303\301\211\211\211\211\211\211\211\211\211\203M\304 \203F\304 `V\203,\305 \210\212\304 b\210\306 )\262 \307 \203?\310\311!\210\312 \262\f\202U\313\314!\210\202U\315 \262 \312 \262\f\316\317\"!\262\n @\262\204\233 \203\233 \211A\262 \242b\210\320 `\"\204d\321` \"\262 \322 8\203d@\262A@\262\202d\205\314\203\250\323\262\324!\262b\210\312 \262\f\3252\211?\205` Y\205\326 X\203\361\327!\210\330!\203\353\320 `\"\204\353`\331BB\262\202\n\332\262\202\n\333 \210\334 \335=\203\n\320 `\"\204\n`\336BB\262o\203\337\325\301\"\210\202\271\340\341!\210\202\2710\210\2032@A\336=\2032A\262\202\203\303@@A\203O\212A@@b\210\310\311!\210\312 )\202Q\f\262\321\"\262\n\210 \335=\203k\342 8\262\202\220\322 8\343\n8\203\213\211\203\213\324!\324!V\203\213\262\210\202\220\262\266\203\274\206\232BB\262\nb\210\344\306 x\210\307 \203\265\324!\202\271\324`!T]\262 A\262\2022\205\314\345 \"\266\215)\207" [haskell-indent-rhs-align-column nil rhs 0 mark exchange-point-and-mark line-beginning-position haskell-indent-bolp haskell-indent-forward-line -1 line-end-position error "The mark is not set for aligning definitions" haskell-indent-start-of-def reverse haskell-indent-contour-line haskell-indent-open-structure haskell-indent-separate-valdef 5 "\\<\\|(" haskell-indent-point-to-col top-of-buffer haskell-indent-current-indentation move-to-column looking-at eqn t haskell-indent-back-to-indentation haskell-indent-type-at-point guard gd throw haskell-indent-backward-to-indentation 1 3 6 " " haskell-indent-shift-columns] 20 (#$ . 30278)]) #@92 Align the guards and rhs of functions in the region, which must be active. (fn START END) (defalias 'haskell-indent-align-guards-and-rhs #[514 "\300\301\302\"\210\300\301\303\"\207" [haskell-indent-align-def t guard rhs] 5 (#$ . 32172) "*r"]) #@70 Insert an = sign and align the previous rhs of the current function. (defalias 'haskell-indent-insert-equal #[0 "\300 \204 h\301U\204\301c\210\302c\210\303\304 \305\"\207" [haskell-indent-bolp 32 "= " haskell-indent-align-def haskell-indent-mark-active rhs] 3 (#$ . 32422) "*"]) #@152 Insert and align a guard sign (|) followed by optional TEXT. Alignment works only if all guards are to the south-east of their |. (fn &optional TEXT) (defalias 'haskell-indent-insert-guard #[256 "\300 \203 \301\202\nh`\302Zf\206\303\304U\203$\211\305U\204?\306c\210\202?\305U\203<\211\305U\2036\307c\210\202?\310c\210\202?\307c\210\203Fc\210\311\312 \313\"\207" [haskell-indent-bolp 10 2 0 32 124 "| " " | " " " haskell-indent-align-def haskell-indent-mark-active guard] 6 (#$ . 32711) "*"]) #@106 Insert a guard sign (|) followed by `otherwise'. Also align the previous guards of the current function. (defalias 'haskell-indent-insert-otherwise #[0 "\300\301!\210\302 \207" [haskell-indent-insert-guard "otherwise" haskell-indent-insert-equal] 2 (#$ . 33227) "*"]) #@91 Insert a where keyword at point and indent resulting line. One indentation cycle is used. (defalias 'haskell-indent-insert-where #[0 "\300c\210\301 \207" ["where " haskell-indent-cycle] 1 (#$ . 33501) "*"]) #@72 Non-nil if the semi-intelligent Haskell indentation mode is in effect. (defvar haskell-indent-mode nil (#$ . 33714)) (make-variable-buffer-local 'haskell-indent-mode) (defvar haskell-indent-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\207" [make-sparse-keymap define-key [3 67108925] haskell-indent-insert-equal [3 67108988] haskell-indent-insert-guard "" haskell-indent-insert-otherwise "" haskell-indent-insert-where [3 67108910] haskell-indent-align-guards-and-rhs [3 67108926] haskell-indent-put-region-in-literate] 5)) #@51 Turn on ``intelligent'' Haskell indentation mode. (defalias 'turn-on-haskell-indent #[0 "\305\300!\203\203\306\300!\203\300\307!\210\310\301!\210\311\310\302!\210\312\313\314 \211\2036\211\f=\2046\315!\262\202$\211\204M\316\f\314 \"\210\317 \262\316\f\"\210\320!\210\210\321\322!\207" [haskell-indentation-mode indent-line-function indent-region-function haskell-indent-mode haskell-indent-map boundp fboundp 0 make-local-variable haskell-indent-cycle haskell-indent-region t current-local-map keymap-parent set-keymap-parent make-sparse-keymap use-local-map run-hooks haskell-indent-hook] 4 (#$ . 34333)]) #@52 Turn off ``intelligent'' Haskell indentation mode. (defalias 'turn-off-haskell-indent #[0 "\302\303!\210\302\304!\210\305 \211\203'\306!=\203\"\307\306!\"\266\202\n\262\202\n\210\310\211\207" [haskell-indent-map haskell-indent-mode kill-local-variable indent-line-function indent-region-function current-local-map keymap-parent set-keymap-parent nil] 6 (#$ . 34965)]) (byte-code "\300\301\302!\236\204\303\302\304\301\302!\305\"\"\210\300\207" [haskell-indent-mode default-value minor-mode-alist set-default append ((haskell-indent-mode " Ind"))] 5) #@1036 ``Intelligent'' Haskell indentation mode. This deals with the layout rule of Haskell. \[haskell-indent-cycle] starts the cycle which proposes new possibilities as long as the TAB key is pressed. Any other key or mouse click terminates the cycle and is interpreted except for RET which merely exits the cycle. Other special keys are: \[haskell-indent-insert-equal] inserts an = \[haskell-indent-insert-guard] inserts an | \[haskell-indent-insert-otherwise] inserts an | otherwise = these functions also align the guards and rhs of the current definition \[haskell-indent-insert-where] inserts a where keyword \[haskell-indent-align-guards-and-rhs] aligns the guards and rhs of the region \[haskell-indent-put-region-in-literate] makes the region a piece of literate code in a literate script If `ARG' is falsey, toggle `haskell-indent-mode'. Else sets `haskell-indent-mode' to whether `ARG' is greater than 0. Invokes `haskell-indent-hook' if not nil. (fn &optional ARG) (defalias 'haskell-indent-mode #[256 "\211\204 ?\202\301!\302V\211\203\303 \207\304 \207" [haskell-indent-mode prefix-numeric-value 0 turn-on-haskell-indent turn-off-haskell-indent] 4 (#$ . 35537) "P"]) (provide 'haskell-indent)