Skip to content

Commit 2e8c47e

Browse files
committed
Format
1 parent 88be1a9 commit 2e8c47e

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

.ocamlformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=0.27.0
1+
version=0.28.1
22
assignment-operator=end-line
33
break-cases=fit
44
break-fun-decl=wrap

src/lsc_ast.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ module StellarSig = struct
2222
let compatible (p1, f1) (p2, f2) =
2323
String.equal f1 f2
2424
&&
25-
match (p1, p2) with Pos, Neg | Neg, Pos | Null, Null -> true | _ -> false
25+
match (p1, p2) with
26+
| Pos, Neg | Neg, Pos | Null, Null -> true
27+
| _ -> false
2628
end
2729

2830
module StellarRays = Unification.Make (StellarSig)
@@ -140,7 +142,7 @@ let subst_all_vars sub = List.map ~f:(Marked.map ~f:(subst sub))
140142
let all_vars mcs : StellarSig.idvar list =
141143
mcs
142144
|> List.concat_map ~f:(function Marked.State s | Marked.Action s ->
143-
List.concat_map s.content ~f:StellarRays.vars )
145+
List.concat_map s.content ~f:StellarRays.vars )
144146

145147
let normalize_vars (mcs : Marked.constellation) =
146148
let vars = all_vars mcs in

src/lsc_pretty.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let rec string_of_ray = function
2020
let string_of_subst substitution =
2121
substitution
2222
|> List.map ~f:(fun (var, ray) ->
23-
Printf.sprintf "%s->%s" (string_of_var var) (string_of_ray ray) )
23+
Printf.sprintf "%s->%s" (string_of_var var) (string_of_ray ray) )
2424
|> String.concat ~sep:", " |> Printf.sprintf "{%s}"
2525

2626
let string_of_ban = function

src/sgen_eval.ml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,9 @@ let rec eval_sgen_expr (env : env) :
271271
| [ State { content = [ r ]; bans = _ } ]
272272
| [ Action { content = [ r ]; bans = _ } ] ->
273273
let er = expr_of_ray r in
274-
begin
275-
match Expr.sgen_expr_of_expr er with
276-
| Ok sg -> eval_sgen_expr env' sg
277-
| Error e -> Error (ExprError (e, None))
274+
begin match Expr.sgen_expr_of_expr er with
275+
| Ok sg -> eval_sgen_expr env' sg
276+
| Error e -> Error (ExprError (e, None))
278277
end
279278
| e ->
280279
failwith

web/playground.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ let run_stellogen code_js =
3232
let () =
3333
Console.console##log (Js.string "Stellogen playground loaded");
3434
Js.export "Stellogen"
35-
(object%js
36-
method run code = run_stellogen code
37-
end )
35+
object%js
36+
method run code = run_stellogen code
37+
end

0 commit comments

Comments
 (0)