4e987026 |
(provide (quote haskell))
(require (quote comint))
(defvar haskell-program-name (getenv "HASKELLPROG") "\
*Program invoked by the haskell command")
(defvar *haskell-buffer* "*haskell*" "\
*Name of the haskell process buffer")
(defvar *haskell-show-error* 1 "\
*If not nil move to the buffer where the error was found")
(defvar haskell-auto-create-process t "\
*If not nil, create a Haskell process automatically when required to evaluate or compile Haskell code")
(defvar *haskell-debug-in-lisp* nil "\
*If not nil, enter Lisp debugger on error; otherwise, automagically return
to Haskell top-level.")
(defvar *emacs* nil "\
When not nil means haskell is in emacs mode")
(defvar haskell-main-pad "*Main-pad*" "\
Scratch pad associated with module Main")
(defvar haskell-main-file "Main")
(defvar haskell-main-module "Main")
(defvar *last-loaded* haskell-main-file "\
Last file loaded with a :load command - Defaults to Main")
(defvar *last-loaded-modtime* nil "\
Modification time of last file loaded, used to determine whether it
needs to be reloaded.")
(defvar *last-module* haskell-main-module "\
Last module set with a :module command - Defaults to Main")
(defvar *last-pad* haskell-main-pad "\
Last pad saved with a :save command - Defaults to Main")
(defvar *ht-source-file* "$HASKELL/progs/tutorial/tutorial.hs")
(defvar *ht-temp-buffer* nil)
(defvar *ht-file-buffer* "Haskell-Tutorial-Master")
(defvar haskell-mode-map nil "\
Keymap used for haskell-mode")
(defun haskell-establish-key-bindings (keymap) (byte-code "���#����#����#����#����#����#����#����#����#����#����#����#����#����#����#����#����#�" [keymap define-key "e" haskell-eval "r" haskell-run "m" haskell-run-main "" haskell-run-file "p" haskell-get-pad "" haskell-optimizers "" haskell-printers "c" haskell-compile "l" haskell-load "h" haskell-switch ":" haskell-command "q" haskell-exit "i" haskell-interrupt "u" haskell-edit-unit "d" haskell-please-recover "(" haskell-ensure-lisp-mode ")" haskell-resume-command-loop] 20))
(if haskell-mode-map nil (progn (setq haskell-mode-map (make-sparse-keymap)) (haskell-establish-key-bindings haskell-mode-map)))
(defvar haskell-mode-syntax-table nil "\
Syntax table used for haskell-mode")
(if haskell-mode-syntax-table nil (setq haskell-mode-syntax-table (standard-syntax-table)))
(defun haskell-mode nil "\
Major mode for editing Haskell code to run in Emacs
The following commands are available:
\\{haskell-mode-map}
A Haskell process can be fired up with \"M-x haskell\".
Customization: Entry to this mode runs the hooks that are the value of variable
haskell-mode-hook.
Windows:
There are 3 types of windows associated with Haskell mode. They are:
*haskell*: which is the process window.
Pad: which are buffers available for each module. It is here
where you want to test things before preserving them in a
file. Pads are always associated with a module.
When issuing a command:
The pad and its associated module are sent to the Haskell
process prior to the execution of the command.
.hs: These are the files where Haskell programs live. They
have .hs as extension.
When issuing a command:
The file is sent to the Haskell process prior to the
execution of the command.
Commands:
Each command behaves differently according to the type of the window in which
the cursor is positioned when the command is issued .
haskell-eval: \\[haskell-eval]
Always promts user for a Haskell expression to be evaluated. If in a
.hs file buffer, then the cursor tells which module is the current
module and the pad for that module (if any) gets loaded as well.
haskell-run: \\[haskell-run]
Always queries for a variable of type Dialogue to be evaluated.
haskell-run-main: \\[haskell-run-main]
Run Dialogue named main.
haskell-run-file: \\[haskell-run-file]
Runs a file. Ideally the file has a set of variable of type Dialogue
that get evaluated.
haskell-mode: \\[haskell-mode]
Puts the current buffer in haskell mode.
haskell-compile: \\[haskell-compile]
Compiles file in current buffer.
haskell-load: \\[haskell-load]
Loads file in current buffer.
haskell-pad: \\[haskell-pad]
Creates a scratch pad for the current module.
haskell-optimizers: \\[haskell-optimizers]
Shows the list of available optimizers. Commands for turning them on/off.
haskell-printers: \\[haskell-printers]
Shows the list of available printers. Commands for turning them on/off.
haskell-command: \\[haskell-command]
Prompts for a command to be sent to the command interface. You don't
need to put the : before the command.
haskell-quit: \\[haskell-quit]
Terminates the haskell process.
switch-to-haskell: \\[switch-to-haskell]
Switchs to the inferior Haskell buffer (*haskell*) and positions the
cursor at the end of the buffer.
haskell-interrupt: \\[haskell-interrupt]
Interrupts haskell process and resets it.
haskell-edit-unit: \\[haskell-edit-unit]
Edit the .hu file for the unit containing this file.
" (interactive) (byte-code "ň� ��!�ȉ�ɉ���!�ˉ��!���!�" [haskell-mode-map major-mode mode-name indent-line-function haskell-mode-syntax-table nil kill-all-local-variables use-local-map haskell-mode "Haskell" make-local-variable indent-relative-maybe set-syntax-table run-hooks haskell-mode-hook] 6))
(defvar inferior-haskell-mode-map nil)
(if inferior-haskell-mode-map nil (setq inferior-haskell-mode-map (full-copy-sparse-keymap comint-mode-map)) (haskell-establish-key-bindings inferior-haskell-mode-map) (define-key inferior-haskell-mode-map "
" (quote haskell-send-input)))
(defvar haskell-source-modes (quote (haskell-mode)) "\
*Used to determine if a buffer contains Haskell source code.
If it's loaded into a buffer that is in one of these major modes,
it's considered a Haskell source file.")
(defvar haskell-prev-l/c-dir/file nil "\
Caches the (directory . file) pair used in the last invocation of
haskell-run-file.")
(defvar haskell-prompt-pattern "^[A-Z]\\([A-Z]\\|[a-z]\\|[0-9]\\)*>\\s-*" "\
Regular expression capturing the Haskell system prompt.")
(defvar haskell-prompt-ring nil "\
Keeps track of input to haskell process from the minibuffer")
(defvar tea-prompt-pattern "^>+\\s-*" "\
Regular expression capturing the T system prompt.")
(defvar haskell-version "Yale University Haskell Version 0.8, 1991" "\
Current Haskell system version")
(defun inferior-haskell-mode-variables nil (byte-code "��" [nil] 1))
(defun inferior-haskell-mode nil "\
Major mode for interacting with an inferior Haskell process.
The following commands are available:
\\{inferior-haskell-mode-map}
A Haskell process can be fired up with \"M-x haskell\".
Customization: Entry to this mode runs the hooks on comint-mode-hook and
inferior-haskell-mode-hook (in that order).
You can send text to the inferior Haskell process from other buffers containing
Haskell source.
Windows:
There are 3 types of windows in the inferior-haskell-mode. They are:
*haskell*: which is the process window.
Pad: which are buffers available for each module. It is here
where you want to test things before preserving them in a
file. Pads are always associated with a module.
When issuing a command:
The pad and its associated module are sent to the Haskell
process prior to the execution of the command.
.hs: These are the files where Haskell programs live. They
have .hs as extension.
When issuing a command:
The file is sent to the Haskell process prior to the
execution of the command.
Commands:
Each command behaves differently according to the type of the window in which
the cursor is positioned when the command is issued.
haskell-eval: \\[haskell-eval]
Always promts user for a Haskell expression to be evaluated. If in a
.hs file, then the cursor tells which module is the current module and
the pad for that module (if any) gets loaded as well.
haskell-run: \\[haskell-run]
Always queries for a variable of type Dialogue to be evaluated.
haskell-run-main: \\[haskell-run-main]
Run Dialogue named main.
haskell-run-file: \\[haskell-run-file]
Runs a file. Ideally the file has a set of variable of type Dialogue
that get evaluated.
haskell-mode: \\[haskell-mode]
Puts the current buffer in haskell mode.
haskell-compile: \\[haskell-compile]
Compiles file in current buffer.
haskell-load: \\[haskell-load]
Loads file in current buffer.
haskell-pad: \\[haskell-pad]
Creates a scratch pad for the current module.
haskell-optimizers: \\[haskell-optimizers]
Shows the list of available optimizers. Commands for turning them on/off.
haskell-printers: \\[haskell-printers]
Shows the list of available printers. Commands for turning them on/off.
haskell-command: \\[haskell-command]
Prompts for a command to be sent to the command interface. You don't
need to put the : before the command.
haskell-quit: \\[haskell-quit]
Terminates the haskell process.
switch-to-haskell: \\[switch-to-haskell]
Switchs to the inferior Haskell buffer (*haskell*) and positions the
cursor at the end of the buffer.
haskell-interrupt: \\[haskell-interrupt]
Interrupts haskell process and resets it.
haskell-edit-unit: \\[haskell-edit-unit]
Edit the .hu file for the unit containing this file.
The usual comint functions are also available. In particular, the
following are all available:
comint-bol: Beginning of line, but skip prompt. Bound to C-a by default.
comint-delchar-or-maybe-eof: Delete char, unless at end of buffer, in
which case send EOF to process. Bound to C-d by default.
Note however, that the default keymap bindings provided shadow some of
the default comint mode bindings, so that you may want to bind them
to your choice of keys.
Comint mode's dynamic completion of filenames in the buffer is available.
(Q.v. comint-dynamic-complete, comint-dynamic-list-completions.)
If you accidentally suspend your process, use \\[comint-continue-subjob]
to continue it." (interactive) (byte-code "ˈ� � ��� �Ή�ω�Љ��
!�҉�Ӊ�ԉ���!��
!� �" [comint-prompt-regexp haskell-prompt-pattern major-mode mode-name mode-line-process inferior-haskell-mode-map comint-input-filter comint-input-sentinel comint-get-old-input haskell-prompt-ring input-ring-size nil comint-mode inferior-haskell-mode-variables inferior-haskell-mode "Inferior Haskell" (": %s : busy") use-local-map haskell-input-filter ignore haskell-get-old-input run-hooks inferior-haskell-mode-hook make-ring] 7))
(defvar inferior-haskell-mode-hook (quote haskell-fresh-start) "\
*Hook for customizing inferior-Haskell mode")
(defun haskell-input-filter (str) "\
Don't save whitespace." (byte-code "��\"?�" [str string-match "\\s *"] 3))
(defvar *haskell-status* (quote dead) "\
Status of the haskell process")
(defun set-haskell-status (value) (byte-code " ��� �" [*haskell-status* value update-mode-line] 2))
(defun get-haskell-status nil (byte-code "�" [*haskell-status*] 1))
(defun update-mode-line nil (byte-code "�q� �=� ʼn�7 �=� lj�7 �=�( ɉ�7 �=�4 ˉ�7 ��!��� !)�" [*haskell-buffer* *haskell-status* mode-line-process t ready (": %s: ready") input (": %s: input") busy (": %s: busy") dead (": %s: dead") haskell-mode-error "Confused about status of haskell process!" set-buffer-modified-p buffer-modified-p] 4))
(defvar *haskell-saved-output* nil)
(defun process-haskell-output (process str) "\
Filter for output from Yale Haskell command interface" (byte-code "��� Ȏ� P��ʼn�� \"��< |