Skip to content

Commit 3606a05

Browse files
committed
clean up x,y -> loc
1 parent 7c7e6a5 commit 3606a05

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

dune-project

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
(description "Requires original files")
2323
(depends ocaml dune iter containers containers-data gen imagelib tsdl owl-base
2424
ocamlgraph logs
25-
ppx_import ppx_deriving ppx_hash ppx_yojson_conv lens)
25+
ppx_import ppx_deriving ppx_hash ppx_yojson_conv ppx_expect ppx_inline_test ppx_update)
2626
(tags
2727
(game engine remake)))
2828

rails.opam

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ depends: [
2525
"ppx_deriving"
2626
"ppx_hash"
2727
"ppx_yojson_conv"
28-
"lens"
28+
"ppx_expect"
29+
"ppx_inline_test"
30+
"ppx_update"
2931
"odoc" {with-doc}
3032
]
3133
build: [

src/rails_lib/backend/backend_low.ml

+4-4
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ module Graph = struct
210210
when TS.(equal_ixn ixn1 ixn3 && equal_ixn ixn2 ixn4 || equal_ixn ixn1 ixn4 && equal_ixn ixn2 ixn3) ->
211211
graph
212212
|> G.remove_segment ~xyd:(ixn1.x,ixn1.y,ixn1.dir)
213-
|> G.add_segment ~xyd1:(ixn3.x,ixn3.y,ixn3.dir)
214-
~xyd2:(x,y,ixn3.search_dir)
213+
|> G.add_segment ~xyd1:(ixn3.x, ixn3.y, ixn3.dir)
214+
~xyd2:(x, y, ixn3.search_dir)
215215
~dist:ixn3.dist
216-
|> G.add_segment ~xyd1:(ixn4.x,ixn4.y,ixn4.dir)
217-
~xyd2:(x,y,ixn4.search_dir)
216+
|> G.add_segment ~xyd1:(ixn4.x, ixn4.y, ixn4.dir)
217+
~xyd2:(x, y, ixn4.search_dir)
218218
~dist:ixn4.dist
219219

220220

src/rails_lib/dune

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
(libraries iter containers containers-data gen imagelib imagelib.unix tsdl owl-base ocamlgraph logs logs.fmt)
55
(inline_tests)
66
(preprocess
7-
(staged_pps ppx_import ppx_deriving.show ppx_deriving.enum ppx_deriving.eq ppx_deriving.ord lens.ppx_deriving ppx_hash ppx_yojson_conv ppx_expect ppx_inline_test)
7+
(staged_pps ppx_import ppx_deriving.show ppx_deriving.enum ppx_deriving.eq ppx_deriving.ord lens.ppx_deriving ppx_hash ppx_yojson_conv ppx_expect ppx_inline_test ppx_update)
88
)
99
)
1010

src/rails_lib/ui/station_map_ui.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ let render win (s:State.t) (v:Edit_train_d.station_map) =
106106

107107
(* Info bar *)
108108
begin match v.selected_station with
109-
| Some ((x,y) as loc) ->
109+
| Some loc ->
110110
let write = write ~idx:4 in
111111
let station = Station_map.get_exn loc s.backend.stations in
112112
let demand = Station.get_demand_exn station in

src/rails_lib/ui/station_view.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module R = Renderer
33

44
(* Station view screen *)
55

6-
let render win (s:State.t) ((x, y) as loc) ~show_demand =
6+
let render win (s:State.t) loc ~show_demand =
77
let ground_y = 186 in
88
let switchingyard_x = 0 in
99
let engineshop_x = 64 in

0 commit comments

Comments
 (0)