;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file contains utf-8 non-ASCII characters, ;;; and so cannot be loaded into Emacs 22 or earlier. (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (string-lessp emacs-version "23") (error "`%s' was compiled for Emacs 23 or later" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\"\207" [require ob org-macs comint add-to-list org-babel-tangle-lang-exts ("haskell" . "hs")] 3) (defvar org-babel-default-header-args:haskell '((:padlines . "no"))) (defvar org-babel-haskell-lhs2tex-command "lhs2tex") (defvar org-babel-haskell-eoe "\"org-babel-haskell-eoe\"") (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable org-babel-haskell-compiler funcall function #[0 "\300\207" [#1="ghc"] 1 #1#] "Command used to compile a Haskell source code file into an executable.\nMay be either a command in the path, like \"ghc\" or an absolute\npath name, like \"/usr/local/bin/ghc\". The command can include\na parameter, such as \"ghc -v\"." :group org-babel :package-version (Org "9.4") :type string] 10) #@36 Haskell-specific header arguments. (defconst org-babel-header-args:haskell '(compile . :any) (#$ . 1225)) #@86 This function should only be called by `org-babel-execute:haskell' (fn BODY PARAMS) (defalias 'org-babel-haskell-execute #[514 "\302\303\304\"\305\302\306\"!\307\236A\211\203\310P\202\311\312\236A\313\314<\203(\202*C\310#\315\316\236A\206:\317\320\321\322#\320\"\313\314<\203G\202IC\310#\323\324\325!!\326\327\330\331\332!\333\"\334$\216r\211q\210 c\210)r\211q\210\335\320\211\320\327%\210*\266\336\337\340 \n\305!&\311\"\210\336P\311\"\211\205Q\341!\320\342\203\242\343\202\243\344\311\342\345\311##\266\202\262\346\347 \236A\350\235?\2056\351\235\204\376\352\235\204\376\353\235\204\376\354\235\204\376\355\235\204\376\356\235\204\376\357\235\204\370\360\235\204\370\361\235\204\370\362\235\203\363\235\204\315\322\"\2026\302\364!\211\323\324\325!!\326\327\330\331\332!\365\"\334$\216r\211q\210c\210)r\211q\210\335\320\211\320\327%\210*\266\366!\262\262\367\370 \236A\371\236A\"\367\372\236A\373\236A\"#\262\207" [org-babel-exeext org-babel-haskell-compiler org-babel-temp-file "Haskell-src-" ".hs" org-babel-process-file-name "Haskell-bin-" :cmdline " " "" :flags mapconcat identity org-babel-read :libs org-entry-get nil "libs" t get-buffer-create generate-new-buffer-name " *temp file*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 write-region org-babel-eval format "%s -o %s %s %s %s" org-remove-indentation replace-regexp-in-string "\\`\\([ ]*\n\\)+" "\\`[ \n ]+" "[ \n ]+\\'" org-babel-reassemble-table :result-params "none" "scalar" "verbatim" "html" "code" "pp" "file" "output" "raw" "org" "drawer" "table" "Haskell-" [buffer-name kill-buffer] org-babel-import-elisp-from-file org-babel-pick-name :colname-names :colnames :rowname-names :rownames] 22 (#$ . 1337)]) #@20 (fn BODY PARAMS) (defalias 'org-babel-interpret-haskell #[514 "\306\307!\210\310\311\312\"\210\313\236A\314\236A\315\316!#\317\"\320B\321!\204,\322\323\"\210\324 \325\326\327\330\331!\332\"\333$\216rq\210\212\334\335C\325\336\337\330\331!\340\"\341\342%\nB\343\344\345p!!b\210`d{\262|\266\343\346\203q\347\202r\350\335\346\351\335##\266\202c\210\352\343\353\"\210 c\210\352\343\353\"\210\fb\210\212\354\355 !\343\353#\205\236\354 \343\353#)\204\253\356\345p!!\210\202\213\344\345p!!b\210\211c\210\203\325\357\346\360\361\355 \206\304\335!#\242\"\203\325\211\242\326\225\343O\240\210\362\242 \")\266\202,\262\363\364 \365\363\366\"!\235A\"\367\370=\203\376\371\372\365!\360#\202\n\373=\203 @\202\n\343\374 \236A\375\235?\205s\376\235\204j\377\235\204j\201@\235\204j\201A\235\204j\201B\235\204j\201C\235\204j\201D\235\204b\201E\235\204b\201F\235\204b\201G\235\203n\201H\235\204n\202s\201I!\262\262\201J\201K\n\236A\201K \236A\"\201J\201L \236A\201L\f\236A\"#)\207" [comint-preoutput-filter-functions comint-input-filter comint-output-filter-functions org-babel-haskell-eoe comint-last-input-end comint-prompt-regexp require inf-haskell add-hook inferior-haskell-hook #[0 "\302\301!\210\303P\211\207" [haskell-prompt-regexp comint-prompt-regexp make-local-variable "\\|^λ?> "] 2] :session :result-type org-babel-expand-body:generic org-babel-variable-assignments:haskell org-babel-haskell-initiate-session ansi-color-filter-apply org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] "" 257 "\300\211\242P\240\207" [] 4 "\n\n(fn TEXT)" nil process-mark get-buffer-process replace-regexp-in-string "\\`\\([ ]*\n\\)+" "\\`[ \n ]+" "[ \n ]+\\'" comint-send-input t re-search-forward regexp-quote accept-process-output string-match "\n" "[ \n]+" split-string mapcar org-strip-quotes reverse org-trim org-babel-reassemble-table output mapconcat identity value :result-params "none" "scalar" "verbatim" "html" "code" "pp" "file" "output" "raw" "org" "drawer" "table" org-babel-script-escape org-babel-pick-name :colname-names :rowname-names] 18 (#$ . 3160)]) #@52 Execute a block of Haskell code. (fn BODY PARAMS) (defalias 'org-babel-execute:haskell #[514 "\300\236A\301\230\211\204\302\"\202\303\"\207" [:compile "yes" org-babel-interpret-haskell org-babel-haskell-execute] 6 (#$ . 5490)]) #@171 Initiate a haskell session. If there is not a current inferior-process-buffer in SESSION then create one. Return the initialized session. (fn &optional SESSION PARAMS) (defalias 'org-babel-haskell-initiate-session #[512 "\300\301!\210\302\303!\206#\304 \305\306\307\310\311!\312\"\313$\216\314 \210\315\316!\210p)\262\207" [require inf-haskell get-buffer "*haskell*" current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 run-haskell sleep-for 0.25] 9 (#$ . 5735)]) #@51 Load BODY into SESSION. (fn SESSION BODY PARAMS) (defalias 'org-babel-load-session:haskell #[771 "\300 \301\302\303\304\305!\306\"\307$\216\310\"\311\312!\313P\314\315!r\211q\210\301\302\316\304\305!\317\"\307$\216c\210\320!\210\321 \210\322 \210*\210\266\202)\207" [current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 org-babel-prep-session:haskell org-babel-temp-file "haskell-load-" ".hs" generate-new-buffer " *temp*" "\301\300!\205 \302\300!\207" [buffer-name kill-buffer] write-file haskell-mode inferior-haskell-load-file] 13 (#$ . 6263)]) #@83 Prepare SESSION according to the header arguments in PARAMS. (fn SESSION PARAMS) (defalias 'org-babel-prep-session:haskell #[514 "\301 \302\303\304\305\306!\307\"\310$\216\311!\312!\204\313\314\"\210\315 \302\303\316\305\306!\317\"\320$\216rq\210\212\321\322\323\324!\"\210,\210p\262)\207" [comint-input-filter current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 org-babel-haskell-initiate-session org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data "\301\300\302\"\207" [set-match-data evaporate] 3 #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] mapc #[257 "\211c\210\300\301\302\"\207" [comint-send-input nil t] 4 "\n\n(fn LINE)"] org-babel-variable-assignments:haskell] 11 (#$ . 6879)]) #@81 Return list of haskell statements assigning the block's variables. (fn PARAMS) (defalias 'org-babel-variable-assignments:haskell #[257 "\300\301\302!\"\207" [mapcar #[257 "\300\301@\302A!#\207" [format "let %s = %s" org-babel-haskell-var-to-haskell] 6 "\n\n(fn PAIR)"] org-babel--get-vars] 5 (#$ . 7678)]) #@166 Convert an elisp value VAR into a haskell variable. The elisp VAR is converted to a string of haskell source code specifying a variable of the same value. (fn VAR) (defalias 'org-babel-haskell-var-to-haskell #[257 "\211<\203\300\301\302\303#\304Q\207\305\306\"\207" ["[" mapconcat org-babel-haskell-var-to-haskell ", " "]" format "%S"] 6 (#$ . 7995)]) #@416 Export to a .lhs file with all haskell code blocks escaped. When called with a prefix argument the resulting .lhs file will be exported to a .tex file. This function will create two new files, base-name.lhs and base-name.tex where base-name is the name of the current Org file. Note that all standard Babel literate programming constructs (header arguments, no-web syntax etc...) are ignored. (fn &optional ARG) (defalias 'org-babel-haskell-export-to-lhs #[256 "\303 \304\305\306 !\307\310!\211\311P\312P\313P\312P\314\315!\316\315!\260 \317\320\321\322!!\323\324\325\326\327!\330\"\331$\216r\211q\210\fc\210eb\210\332\f\317\333#\203\235\334 \323\324\335\326\327!\336\"\337$\216\340\341!G\262)\210\342\334 \323\324\335\326\327!\343\"\337$\216\344\204~\345\346\340\331!\"\203\204\340\337!\202\211\347\340\337!!\350Q)\262\333\211#\210\351\324\224\324\225#\210\202A)r\211q\210\352\317\211\317\324%\210*\266\212\353\354!\210\355!\210\317\356\357\"\210)\360\317!\210\361!\210\355!\210eb\210\331y\210\362c\210\332\363\317\333#\203\375\342\334 \323\324\335\326\327!\364\"\337$\216\347\340\324!!)\262\333\211#\210\202\327\303 \262 \365 \210\360\317!\210)\361!\210\320\321\322!!\323\324\325\326\327!\366\"\331$\216r\211q\210\fc\210)r\211q\210\352\317\211\317\324%\210*\266 \204C\355!\202O\367\370\"\210\371!\210\355!\207" [org-babel-haskell-lhs2tex-command org-src-preserve-indentation org-export-copy-to-kill-ring buffer-string "^\\([ ]*\\)#\\+begin_src[ ]haskell*\\(.*\\)[ \n]\\([^]*?\\)[ \n][ ]*#\\+end_src.*" file-name-sans-extension buffer-file-name org-babel-temp-file "haskell-" ".org" ".tex" ".lhs" " " org-babel-process-file-name " > " nil get-buffer-create generate-new-buffer-name " *temp file*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 re-search-forward t match-data "\301\300\302\"\207" [set-match-data evaporate] 3 match-string 1 replace-match [set-match-data evaporate] "#+begin_export latex\n\\begin{code}\n" string-match "-i" org-remove-indentation "\n\\end{code}\n#+end_export\n" indent-code-rigidly write-region require ox-latex find-file org-export-to-file latex kill-buffer delete-file "%include polycode.fmt\n" "^[ ]+\\\\begin{code}[^]+\\\\end{code}" [set-match-data evaporate] save-buffer [buffer-name kill-buffer] message "running %s" shell-command] 22 (#$ . 8359) "P"]) (provide 'ob-haskell)