aboutsummaryrefslogtreecommitdiffhomepage
path: root/pghaskell/pghaskell.el
blob: f2aec4266bd29aca30d2c5344c2cb50ed7d731cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
;; pghaskell.el - Proof General for Haskell scripts.
;;
;; David Aspinall.  $Id$
;;
;; This instance of PG is handy just for using script management to
;; cut-and-paste into a buffer running Haskell (ghci)
;;
;; I'm providing this so that tool demonstrators may use it instead of
;; tediously doing cut-and-paste of commands from a file.  No history
;; management, and nothing to do with theorem proving really!
;;
;; To use this instance of PG, visit a file with the ".pghci" extension
;; or type
;;
;;  M-x pghaskell-mode
;;
;; in an ordinary .h file.  (Check that you have enabled the instance
;; in proof-site.el).
;;


(require 'proof-easy-config)
(require 'proof-syntax)

(proof-easy-config 'pghaskell "PG-Haskell"

 proof-prog-name		     "ghci"

;; BELOW HERE TO COMPLETE

 proof-terminal-string               ";;"
 proof-script-comment-start          "(*"
 proof-script-comment-end            "*)"
 proof-shell-annotated-prompt-regexp "^# "  ;; matches interpreter prompts

 ;; Syntax table suitable for Haskell; see Elisp documentation of `modify-syntax-entry'
 proof-script-syntax-table-entries
 '(?\` "\""
   ?\$ "."
   ?\/ "."
   ?\\ "."
   ?+  "."
   ?-  "."
   ?=  "."
   ?%  "."
   ?<  "."
   ?>  "."
   ?\& "."
   ?.  "w"
   ?_  "w"
   ?\' "w"
   ?\| "."
   ?\* ". 23n"
   ?\( "()1"
   ?\) ")(4")

 ;; next setting is just to prevent warning
 proof-save-command-regexp	proof-no-regexp
 )

(provide 'pghaskell)