aboutsummaryrefslogtreecommitdiff
path: root/css
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2022-02-07 16:09:14 +0100
committerSébastien Dailly <sebastien@dailly.me>2022-02-07 16:15:44 +0100
commit5d5549c168af51195e66bf67cc5b23382b8c7d52 (patch)
tree6268ecee9135854b209a5533eeb99540b7955f31 /css
parent58e892fb0159c42740ae92a642f7eb76245950a6 (diff)
Changed the organisation in the applications
Diffstat (limited to 'css')
-rwxr-xr-xcss/dune1
-rwxr-xr-xcss/merger.ml17
2 files changed, 11 insertions, 7 deletions
diff --git a/css/dune b/css/dune
index 65a9c41..1e32b19 100755
--- a/css/dune
+++ b/css/dune
@@ -5,6 +5,7 @@
brr.note
elements
blog
+ application
Css
css_lib
)
diff --git a/css/merger.ml b/css/merger.ml
index 7f525ff..a7c33eb 100755
--- a/css/merger.ml
+++ b/css/merger.ml
@@ -47,7 +47,7 @@ let build_result
merge_result
let do_action
- : event -> state -> state
+ : (event, state) Application.t
= fun event state ->
match event with
| AddFile file ->
@@ -230,13 +230,16 @@ let main id =
let add_file_event, add_file_sender = Note.E.create () in
let del_file_event, del_file_sender = Note.E.create () in
+
let state =
- E.select
- [ E.map (fun f -> AddFile f) add_file_event
- ; del_file_event
- ]
- |> E.map do_action
- |> Note.S.accum init in
+ Application.run
+ do_action
+ init
+ (E.select
+ [ E.map (fun f -> AddFile f) add_file_event
+ ; del_file_event
+ ])
+ in
let _ = Elr.def_children
elements