;ELC   
;;; Compiled
;;; in Emacs version 24.5.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\303\304\305\"\207" [require ob 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\"")
#@34 Execute a block of Haskell code.
(defalias 'org-babel-execute:haskell #[(body params) "\306\307\"A\310\311\312\313\"\"\306\314\"A\315\f\316!#\317	\"\320	!\204, \321\322	\"\210\323 @\324\216r	q\210\325A\326B\327CBC\330\211DE\331\332p!!b\210`dF\211GF{DGF|\210*\333!c\210\334\330\335\"\210Hc\210\334\330\335\"\210Ib\210\212\336\337H!\330\335#\205\213 \336J\330\335#)\204\230 \340\332p!!\210\202u \331\332p!!b\210Dc\210\203\301 \341\342\343\344\337\206\261 \326!#B\"\203\301 B\345\225\330OE\346BJ\".E\310\347H\350\310\333E\"!\235A\"K\351\352\353\"\203\357 \354\355\350KA!\343#\202\371 \352\356\"\205\371 K@L\306\357\"AM\360M\235?\205`\361M\235\204W\362M\235\204W\363M\235\204W\364M\235\204W\365M\235\204W\366M\235\204W\367M\235\204P\370M\235\204P\371M\235\204P\372M\235\203\\\373M\235\204\\L\202`\374L!*\375\306\376\"A\306\376\"A\"\375\306\377\"A\306\377\"A\"#.\207" [params session vars result-type body full-body assoc :session mapcar cdr org-babel-get-header :var :result-type org-babel-expand-body:generic org-babel-variable-assignments:haskell org-babel-haskell-initiate-session org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) #[(input) "\300\207" [nil] 1] "" #[(text) "	P\211\207" [string-buffer text] 2] nil process-mark get-buffer-process org-babel-trim comint-send-input t re-search-forward regexp-quote accept-process-output string-match replace-regexp-in-string "\n" "[\n]+" 0 split-string org-babel-haskell-read-string reverse org-babel-reassemble-table eql 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 save-match-data-internal comint-input-filter string-buffer comint-output-filter-functions dangling-text raw end start org-babel-haskell-eoe comint-last-input-end comint-prompt-regexp results result #1=#:--params] 9 (#$ . 730)])
#@41 Strip \"s from around a haskell string.
(defalias 'org-babel-haskell-read-string #[(string) "\301\302\"\203\f \303\304\"\207\207" [string string-match "^\"\\([^ ]+\\)\"$" match-string 1] 3 (#$ . 2856)])
#@140 Initiate a haskell session.
If there is not a current inferior-process-buffer in SESSION
then create one.  Return the initialized session.
(defalias 'org-babel-haskell-initiate-session #[(&optional session params) "\301\302!\210\303\304!\206 \305 \306\216\307 \210\310\311!\210p*\207" [#1=#:wconfig require inf-haskell get-buffer "*haskell*" current-window-configuration ((set-window-configuration #1#)) run-haskell sleep-for 0.25] 2 (#$ . 3069)])
#@25 Load BODY into SESSION.
(defalias 'org-babel-load-session:haskell #[(session body params) "\306 \307\216\310	\n\"\311\312!\313P\314\315!rq\210\316\216c\210\317\f!\210\320 \210\321 \210+,\207" [#1=#:wconfig session params buffer load-file #2=#:temp-buffer current-window-configuration ((set-window-configuration #1#)) org-babel-prep-session:haskell org-babel-temp-file "haskell-load-" ".hs" generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#2# buffer-name kill-buffer] 2)) write-file haskell-mode inferior-haskell-load-file body] 3 (#$ . 3525)])
#@62 Prepare SESSION according to the header arguments in PARAMS.
(defalias 'org-babel-prep-session:haskell #[(session params) "\306 \307\216\310	!\311\n!\204 \312\313\n\"\210\314 \315\216r\nq\210\316\317\320\321!\"\210,p+\207" [#1=#:wconfig session buffer save-match-data-internal comint-input-filter params current-window-configuration ((set-window-configuration #1#)) org-babel-haskell-initiate-session org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) #[(input) "\300\207" [nil] 1] mapc #[(line) "c\210\301\302\303\"\207" [line comint-send-input nil t] 3] org-babel-variable-assignments:haskell] 4 (#$ . 4112)])
#@68 Return list of haskell statements assigning the block's variables.
(defalias 'org-babel-variable-assignments:haskell #[(params) "\301\302\301\303\304\305\"\"\"\207" [params mapcar #[(pair) "\301\302@\303A!#\207" [pair format "let %s = %s" org-babel-haskell-var-to-haskell] 5] cdr org-babel-get-header :var] 7 (#$ . 4864)])
#@156 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.
(defalias 'org-babel-haskell-var-to-haskell #[(var) "<\203 \301\302\303\304#\305Q\207\306\307\"\207" [var "[" mapconcat org-babel-haskell-var-to-haskell ", " "]" format "%S"] 5 (#$ . 5197)])
#@401 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-mode file.

Note that all standard Babel literate programming
constructs (header arguments, no-web syntax etc...) are ignored.
(defalias 'org-babel-haskell-export-to-lhs #[(&optional arg) "\306 \307\310\311 !\312\313!\211\314P\315P\n\316P8\n\315P9:\317\3208!\321\3209!\260;<=\322>\f\323\324\325!!?@\326\216r?q\210c\210eb\210\327	\322\330#\203\227 \331 A\332\216\333\334!G>*\335\331 A\336\216\337=\204y \340\341\333\342!\"\203 \333\343!\202\204 \344\333\343!!\345Q*\330\211#\210\346\347\224\347\225>#\210\202N )r?q\210\350\322\211@\322\347%\210,\212\351\352!\210\353\f!\210\322B\354\355\"\210)\356\322!\210\357\f!\210\353!\210eb\210\342y\210\360c\210\327\361\322\330#\203\352 \335\331 A\362\216\344\333\347!!*\330\211#\210\202\316 \306 \363 \210\356\322!\210)\357!\2108\323\324\325!!CD\364\216rCq\210c\210)rCq\210\350\322\211D\322\347%\210,E\204*\3538!\2029\365\366;\"\210\367;!\210\3539!.\207" [contents haskell-regexp base-name tmp-file tmp-org-file tmp-tex-file 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*" ((byte-code "\301!\203\n \302!\210\301\207" [#1=#:temp-buffer buffer-name kill-buffer] 2)) re-search-forward t match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) match-string 1 replace-match ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) "#+begin_latex\n\\begin{code}\n" string-match "-i" 2 3 org-remove-indentation "\n\\end{code}\n#+end_latex\n" indent-code-rigidly 0 write-region require ox-latex find-file org-export-to-file latex kill-buffer delete-file "%include polycode.fmt\n" "^[ 	]+\\\\begin{code}[^ ]+\\\\end{code}" ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) save-buffer ((byte-code "\301!\203\n \302!\210\301\207" [#2=#:temp-buffer buffer-name kill-buffer] 2)) message "running %s" shell-command lhs-file tex-file org-babel-haskell-lhs2tex-command command org-src-preserve-indentation preserve-indentp indentation #1# #3=#:temp-file save-match-data-internal org-export-copy-to-kill-ring #2# #4=#:temp-file arg] 7 (#$ . 5554) "P"])
(provide 'ob-haskell)
