;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require cl-lib haskell-cabal haskell-customize] 2) (defvar haskell-session nil nil) (make-variable-buffer-local 'haskell-session) #@44 All Haskell sessions in the Emacs session. (defvar haskell-sessions nil (#$ . 271)) #@51 Get the filename for the TAGS file. (fn SESSION) (defalias 'haskell-session-tags-filename #[257 "\300!\301P\207" [haskell-session-cabal-dir "/TAGS"] 3 (#$ . 361)]) #@63 Maybe get the Haskell session, return nil if there isn't one. (defalias 'haskell-session-maybe #[0 "\301\300!\203\207\302\211\207" [haskell-session default-boundp nil] 2 (#$ . 533)]) #@38 Get the session based on the buffer. (defalias 'haskell-session-from-buffer #[0 "\301 \205:\205\302\303\304\305$\207" [haskell-sessions buffer-file-name cl-reduce #[514 "\300\301\"\211\203,\302\303\304 !\"\203*\203(\300\301\"G\300\301\"GV\203&\207\207\207\207\207" [haskell-session-get cabal-dir string-prefix-p file-name-directory buffer-file-name] 7 "\n\n(fn ACC A)"] :initial-value nil] 5 (#$ . 726)]) #@61 Generate a default project name for the new project prompt. (defalias 'haskell-session-default-name #[0 "\300 \211\203\301\302!!\227\206\303\207" [haskell-cabal-find-file file-name-sans-extension file-name-nondirectory "haskell"] 4 (#$ . 1157)]) #@206 Assing current buffer to SESSION. This could be helpful for temporary or auxiliary buffers such as presentation mode buffers (e.g. in case when session is killed with all relevant buffers). (fn SESSION) (defalias 'haskell-session-assign #[257 "\301\300!\210\211\211\207" [haskell-session make-local-variable] 3 (#$ . 1415)]) #@65 Find a session by choosing from a list of the current sessions. (defalias 'haskell-session-choose #[0 "\205 \302\303\304\305\306\"\"\"\307\310\311\"\"\262\207" [haskell-sessions haskell-completing-read-function "Choose Haskell session: " cl-remove-if #[257 "\205 \301!\230\207" [haskell-session haskell-session-name] 3 "\n\n(fn NAME)"] mapcar haskell-session-name cl-find-if make-closure #[257 "\301!\300\230\207" [V0 haskell-session-name] 3 "\n\n(fn SESSION)"]] 7 (#$ . 1749)]) #@49 Clear the buffer of any Haskell session choice. (defalias 'haskell-session-clear #[0 "\301\300!\210\302\211\207" [haskell-session make-local-variable nil] 2 (#$ . 2246)]) #@37 Get the session by name. (fn NAME) (defalias 'haskell-session-lookup #[257 "\301\302\303\"\"\207" [haskell-sessions cl-remove-if-not make-closure #[257 "\300\301!\230\207" [V0 haskell-session-name] 4 "\n\n(fn S)"]] 5 (#$ . 2424)]) #@59 Strip the load dir from the file path. (fn SESSION FILE) (defalias 'haskell-session-strip-dir #[514 "\300!GGV\203!\301GO\230\203\302\303\304G\305O#\207\207\207" [haskell-session-current-dir 0 replace-regexp-in-string "^[/\\]" "" nil] 9 (#$ . 2665)]) #@44 Get the session current directory. (fn S) (defalias 'haskell-session-current-dir #[257 "\300\301\"\211\206 \302\303!\207" [haskell-session-get current-dir error "No current directory."] 4 (#$ . 2935)]) #@31 Get the session name. (fn S) (defalias 'haskell-session-name #[257 "\300\301\"\207" [haskell-session-get name] 4 (#$ . 3146)]) #@108 Get the session build target. If `haskell-process-load-or-reload-prompt' is nil, accept `default'. (fn S) (defalias 'haskell-session-target #[257 "\301\302\"\211\203\f\211\202\203\303\304\305\"\202\306\307\"\262\211\306\230?\205&\211\207" [haskell-process-load-or-reload-prompt haskell-session-get target haskell-session-choose-target "Build target (empty for default): " t "" haskell-session-set-target] 6 (#$ . 3282)]) #@319 Ask the user which of the available targets they want to use. Optional arguments: PROMPT allows you to specify which prompt should be presented to the user. BLANK-DEFAULT will allow specifying a default blank argument. HISTORY provides the history to `completing-read'. (fn &optional PROMPT BLANK-DEFAULT HISTORY) (defalias 'haskell-session-choose-target #[768 "\206\300\301\302 !\205\303C\304\305\"\306\211\211 &\207" ["Build Target: " haskell-session-get-targets haskell-process-type "" completing-read append nil] 14 (#$ . 3724)]) #@56 Return a list of available targets. (fn PROCESS-TYPE) (defalias 'haskell-session-get-targets #[257 "\211\301=\203\f\302\303\304#\207\305\306 !\207" [haskell-process-path-stack stack-ghci haskell-session-get-targets-command "ide" "targets" haskell-cabal-enum-targets haskell-process-type] 5 (#$ . 4281)]) #@89 Run an external command to obtain a list of available targets. (fn COMMAND &rest ARGS) (defalias 'haskell-session-get-targets-command #[385 "\300\301\302\"r\211q\210\303\304\"\216\305\306\307p\302&\211\310\267\202+\311\312\313\314 !\"\202,\307\202,\307\262*\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] apply process-file nil #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (0 29 1 39)) cl-remove-if #[257 "\211\300\230\207" [""] 3 "\n\n(fn LINE)"] split-string buffer-string] 10 (#$ . 4594)]) #@46 Set the session build target. (fn S TARGET) (defalias 'haskell-session-set-target #[514 "\300\301#\207" [haskell-session-set target] 6 (#$ . 5214)]) #@47 Set the session interactive buffer. (fn S V) (defalias 'haskell-session-set-interactive-buffer #[514 "\300\301#\207" [haskell-session-set interactive-buffer] 6 (#$ . 5372)]) #@36 Set the session process. (fn S V) (defalias 'haskell-session-set-process #[514 "\300\301#\207" [haskell-session-set process] 6 (#$ . 5555)]) #@34 Get the session process. (fn S) (defalias 'haskell-session-process #[257 "\300\301\"\207" [haskell-session-get process] 4 (#$ . 5705)]) #@38 Set the session cabal-dir. (fn S V) (defalias 'haskell-session-set-cabal-dir #[514 "\300!\301\302#\210\303\"\207" [file-truename haskell-session-set cabal-dir haskell-session-set-cabal-checksum] 7 (#$ . 5849)]) #@46 Set the session current directory. (fn S V) (defalias 'haskell-session-set-current-dir #[514 "\300!\301\302#\207" [file-truename haskell-session-set current-dir] 7 (#$ . 6072)]) #@60 Set the session checksum of .cabal files (fn S CABAL-DIR) (defalias 'haskell-session-set-cabal-checksum #[514 "\300\301\302!#\207" [haskell-session-set cabal-checksum haskell-cabal-compute-checksum] 7 (#$ . 6260)]) #@36 Get the session cabal-dir. (fn S) (defalias 'haskell-session-cabal-dir #[257 "\301\302\"\206\303?!\211\203\304\"\210\211\202\305!\262\207" [haskell-process-load-or-reload-prompt haskell-session-get cabal-dir haskell-cabal-get-dir haskell-session-set-cabal-dir haskell-session-cabal-dir] 5 (#$ . 6484)]) #@74 Update the value at KEY in SESSION with UPDATE. (fn SESSION KEY UPDATE) (defalias 'haskell-session-modify #[771 "\300\301\"!#\207" [haskell-session-set haskell-session-get] 10 (#$ . 6806)]) #@76 Get the SESSION's KEY value. Returns nil if KEY not set. (fn SESSION KEY) (defalias 'haskell-session-get #[514 "\211\236A\207" [] 4 (#$ . 7010)]) #@82 Set the SESSION's KEY to VALUE. Returns newly set VALUE. (fn SESSION KEY VALUE) (defalias 'haskell-session-set #[771 "\236\211\203 \211\241\207BAB\241\210\207" [] 7 (#$ . 7164)]) (provide 'haskell-session)