-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsml-ext-process.el
40 lines (31 loc) · 1.25 KB
/
sml-ext-process.el
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
;;; sml-ext-process.el -*- lexical-binding: t; indent-tabs-mode: nil; -*-
;;; This file describes the sml-ext-process-backend interface and
;;; extends it with some utility functions.
;; data type
;; = sym of sym ;; both type vars and named types
;; | arrow of type * type
;; | product of type list
;; | record of (sym * type) list
;; data sym {
;; name : string,
;; type : type,
;; file : (string * pos * pos) option,
;; ;; what if its in a (unsaved) buffer?
;; ref : internal-process-ref,
;; }
;; sml-ext-process-symbol : point option -> symbol option
;; sml-ext-process-loaded : point option -> bool
;; sml-ext-process-load-region : (point * point) option -> bool
;; sml-ext-process-holes : unit -> hole list
;; something about errors on load...
;; Maybe explicitly check that the above function names exist?
(require 'sml-ext-process-backend)
;; buffer option -> bool
(defun sml-ext-process-load-buffer (&optional buffer)
"Load a buffer into the process. If no buffer is given, the
current buffer is loaded."
(if buffer
(with-current-buffer (get-buffer-create buffer)
(sml-ext-process-load-region (point-min) (point-max)))
(sml-ext-process-load-region (point-min) (point-max))))
(provide 'sml-ext-process)