forked from mit-plv/fiat-crypto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.dir-locals.el
23 lines (23 loc) · 2.34 KB
/
.dir-locals.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
((coq-mode . ((eval . (let* ((project-root (locate-dominating-file buffer-file-name "_CoqProject"))
(coqprime-folder (expand-file-name "coqprime/src" project-root))
(rewriter-folder (expand-file-name "rewriter/src" project-root))
(rupicola-folder (expand-file-name "rupicola/src" project-root))
(bedrock2-folder (expand-file-name "rupicola/bedrock2/bedrock2/src" project-root))
(bedrock2-compiler-folder (expand-file-name "rupicola/bedrock2/compiler/src" project-root))
(riscv-coq-folder (expand-file-name "rupicola/bedrock2/deps/riscv-coq/src" project-root))
(coqutil-folder (expand-file-name "rupicola/bedrock2/deps/coqutil/src" project-root))
(coq-path (lambda () (split-string (or (getenv "COQPATH") "") path-separator t))))
(unless (member coqutil-folder (funcall coq-path))
(setenv "COQPATH" (mapconcat #'identity (cons coqutil-folder (funcall coq-path)) path-separator)))
(unless (member rewriter-folder (funcall coq-path))
(setenv "COQPATH" (mapconcat #'identity (cons rewriter-folder (funcall coq-path)) path-separator)))
(unless (member rupicola-folder (funcall coq-path))
(setenv "COQPATH" (mapconcat #'identity (cons rupicola-folder (funcall coq-path)) path-separator)))
(unless (member bedrock2-folder (funcall coq-path))
(setenv "COQPATH" (mapconcat #'identity (cons bedrock2-folder (funcall coq-path)) path-separator)))
(unless (member bedrock2-compiler-folder (funcall coq-path))
(setenv "COQPATH" (mapconcat #'identity (cons bedrock2-compiler-folder (funcall coq-path)) path-separator)))
(unless (member riscv-coq-folder (funcall coq-path))
(setenv "COQPATH" (mapconcat #'identity (cons riscv-coq-folder (funcall coq-path)) path-separator)))
(unless (member coqprime-folder (funcall coq-path))
(setenv "COQPATH" (mapconcat #'identity (cons coqprime-folder (funcall coq-path)) path-separator))))))))