forked from jrh13/hol-light
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhol_4.sh
More file actions
executable file
·30 lines (24 loc) · 864 Bytes
/
hol_4.sh
File metadata and controls
executable file
·30 lines (24 loc) · 864 Bytes
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
#!/bin/bash
# Makefile will replace __DIR__ with the path
export HOLLIGHT_DIR=__DIR__
if [ "$#" -eq 1 ]; then
if [ "$1" == "-pp" ]; then
echo "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo -I "__DIR__" pa_j.cmo"
exit 0
elif [ "$1" == "-dir" ]; then
echo "${HOLLIGHT_DIR}"
exit 0
fi
fi
# The default ocaml REPL does not accept arrow keys.
# Export LINE_EDITOR to a proper program to enable this before invoking this
# script. If not set, ledit will be used.
if [ "${LINE_EDITOR}" == "" ]; then
LINE_EDITOR="ledit"
fi
export HOLLIGHT_USE_MODULE=__USE_MODULE__
# If a local OPAM is installed, use it
if [ -d "${HOLLIGHT_DIR}/_opam" ]; then
eval $(opam env --switch "${HOLLIGHT_DIR}/" --set-switch)
fi
${LINE_EDITOR} ${HOLLIGHT_DIR}/ocaml-hol -I `camlp5 -where` camlp5o.cma -init ${HOLLIGHT_DIR}/hol.ml -safe-string -I ${HOLLIGHT_DIR}