Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve the example for partial indentation

  • Loading branch information...
commit 2ba333ba3b9a4aa92dba5eeac3ec1f7600da3809 1 parent fc735a2
@samoht samoht authored
Showing with 14 additions and 5 deletions.
  1. +6 −1 tests/Makefile
  2. +8 −4 tests/partial.mlp
View
7 tests/Makefile
@@ -20,8 +20,13 @@ all: $(TARGETS)
&& echo "OK $*.ml" && rm $*.diff && rm $*.1.ml) \
|| echo "ERROR $*.ml"
+%.mlp.inspect: %.mlp
+ $(OCPINDENT) --lines 5-8 $*.mlp > $*.1.mlp
+ $(OCPINDENT) --debug $*.mlp > $*.2.mlp
+ emacs $*.1.mlp $*.2.mlp
+
%.mlp.indent: %.mlp
- @$(OCPINDENT) --lines 10-12 $*.mlp > $*.1.mlp
+ @$(OCPINDENT) --lines 5-8 $*.mlp > $*.1.mlp
@(diff $*.mlp $*.1.mlp > $*.diff \
&& echo "OK $*.mlp" && rm $*.diff && rm $*.1.mlp) \
|| echo "ERROR $*.mlp"
View
12 tests/partial.mlp
@@ -1,7 +1,11 @@
-let (quot, _rem) =
- let quot_rem n k =
- let (d, m) = (n / k, n mod k) in
-if d < 0 && m > 0 then (d+1, m-k)
+ let () =
+ ffff;
+ hhhhhh;
+ fff;
+ let (quot, _rem) =
+ let quot_rem n k =
+ let (d, m) = (n / k, n mod k) in
+ if d < 0 && m > 0 then (d+1, m-k)
else (d, m)
in
let quot n k = fst (quot_rem n k) in
Please sign in to comment.
Something went wrong with that request. Please try again.