File: default-hollight-dir

package info (click to toggle)
hol-light 20230128-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 45,636 kB
  • sloc: ml: 688,681; cpp: 439; makefile: 302; lisp: 286; java: 279; sh: 251; yacc: 108; perl: 78; ansic: 57; sed: 39; python: 13
file content (32 lines) | stat: -rw-r--r-- 911 bytes parent folder | download | duplicates (2)
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
From: Hendrik Tews <hendrik@askra.de>
Date: Wed, 12 Feb 2020 05:41:25 +0100
Subject: configure default HOL Light source directory

---
 hol.ml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/hol.ml b/hol.ml
index 5af34f7..e319bd2 100644
--- a/hol.ml
+++ b/hol.ml
@@ -11,10 +11,18 @@
 
 let hol_version = "2.20++";;
 
+let debian_hol_light_dir = "/usr/share/hol-light";;
+
 #directory "+compiler-libs";;
 
 let hol_dir = ref
-  (try Sys.getenv "HOLLIGHT_DIR" with Not_found -> Sys.getcwd());;
+  (try Sys.getenv "HOLLIGHT_DIR"
+   with Not_found ->
+     try
+       if Sys.is_directory debian_hol_light_dir
+       then debian_hol_light_dir
+       else raise (Sys_error "")
+     with Sys_error _ -> Sys.getcwd());;
 
 (* ------------------------------------------------------------------------- *)
 (* Should eventually change to "ref(Filename.temp_dir_name)".                *)