Skip to content

Commit 4ea5c16

Browse files
committed
Compilation_unit optimisations (#1035)
1 parent 2a3b9de commit 4ea5c16

File tree

7 files changed

+177
-120
lines changed

7 files changed

+177
-120
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ fmt:
101101
ocamlformat -i \
102102
$$(find utils \
103103
\( -name "*.ml" -or -name "*.mli" \))
104+
ocamlformat -i \
105+
$$(find ocaml/utils \
106+
\( -name "*.ml" -or -name "*.mli" \))
104107

105108
.PHONY: check-fmt
106109
check-fmt:
@@ -113,6 +116,7 @@ check-fmt:
113116
[ "$$(git status --porcelain backend/cmm_helpers.ml{,i})" != "" ] || \
114117
[ "$$(git status --porcelain backend/checkmach.ml{,i})" != "" ] || \
115118
[ "$$(git status --porcelain tools/merge_archives.ml)" != "" ] || \
119+
[ "$$(git status --porcelain ocaml/utils)" != "" ] || \
116120
[ "$$(git status --porcelain utils)" != "" ]; then \
117121
echo; \
118122
echo "Tree must be clean before running 'make check-fmt'"; \
@@ -128,6 +132,7 @@ check-fmt:
128132
[ "$$(git diff backend/cmm_helpers.ml{,i})" != "" ] || \
129133
[ "$$(git diff backend/checkmach.ml{,i})" != "" ] || \
130134
[ "$$(git diff tools/merge_archives.ml)" != "" ] || \
135+
[ "$$(git diff ocaml/utils)" != "" ] || \
131136
[ "$$(git diff utils)" != "" ]; then \
132137
echo; \
133138
echo "The following code was not formatted correctly:"; \

ocaml/boot/ocamlc

-422 Bytes
Binary file not shown.

ocaml/boot/ocamllex

-329 Bytes
Binary file not shown.

ocaml/utils/.ocamlformat

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Please make a pull request to change this file.
2+
disable=true
3+
# There is an .ocamlformat-enable file in this directory.
4+
# Keep the remainder of this file in sync with other .ocamlformat files in this repo.
5+
assignment-operator=begin-line
6+
cases-exp-indent=2
7+
doc-comments=before
8+
dock-collection-brackets=false
9+
if-then-else=keyword-first
10+
module-item-spacing=sparse
11+
parens-tuple=multi-line-only
12+
sequence-blank-line=compact
13+
space-around-lists=false
14+
space-around-variants=false
15+
type-decl=sparse
16+
wrap-comments=true
17+
version=0.24.1

ocaml/utils/.ocamlformat-enable

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
compilation_unit.ml
2+
compilation_unit.mli

0 commit comments

Comments
 (0)