Commit
Author: Kevin Schoon [kevinschoon@gmail.com]
Hash: eb35a9ecbf2acd972db524661926a030aff7081e
Timestamp: Mon, 24 Aug 2020 17:42:53 +0000 (4 years ago)

+17 -11 +/-6 browse
clean up formatting
1diff --git a/.ocamlformat b/.ocamlformat
2new file mode 100644
3index 0000000..f949767
4--- /dev/null
5+++ b/.ocamlformat
6 @@ -0,0 +1 @@
7+ profile = conventional
8 diff --git a/bin/dune b/bin/dune
9index a0adef5..d94a71d 100644
10--- a/bin/dune
11+++ b/bin/dune
12 @@ -2,8 +2,13 @@
13 (public_name note)
14 (name note)
15 (libraries note_lib core)
16- (preprocess (pps ppx_jane))
17+ (preprocess
18+ (pps ppx_jane))
19 (modes byte exe)
20- (ocamlopt_flags -ccopt -static)
21- )
22- (env (dev (flags (:standard -w -32)(:standard -w -27))))
23+ (ocamlopt_flags -ccopt -static))
24+
25+ (env
26+ (dev
27+ (flags
28+ (:standard -w -32)
29+ (:standard -w -27))))
30 diff --git a/lib/config.ml b/lib/config.ml
31index 878026f..9ae5831 100644
32--- a/lib/config.ml
33+++ b/lib/config.ml
34 @@ -21,7 +21,9 @@ let default_config =
35
36 let to_string config =
37 let editor = match config.editor with Some value -> value | None -> "" in
38- let on_mod = match config.on_modification with Some value -> value | None -> "" in
39+ let on_mod =
40+ match config.on_modification with Some value -> value | None -> ""
41+ in
42 let dict =
43 Ezjsonm.dict
44 [
45 diff --git a/lib/config.mli b/lib/config.mli
46index 0be6661..97ec2e7 100644
47--- a/lib/config.mli
48+++ b/lib/config.mli
49 @@ -18,7 +18,7 @@ val read_config : string -> t
50 val initialize : string -> t -> unit
51 (** initialize the host system with the configuration *)
52
53- val get : t -> string -> string option
54+ val get : t -> string -> string option
55 (** returns a key-value string pair from the configuration *)
56
57 val get_exn : t -> string -> string
58 diff --git a/lib/io.ml b/lib/io.ml
59index a957421..71199a8 100644
60--- a/lib/io.ml
61+++ b/lib/io.ml
62 @@ -2,9 +2,7 @@ open Core
63
64 let create ~callback ~content dest =
65 Out_channel.write_all ~data:content dest;
66- match callback with
67- | Some cmd -> Sys.command_exn cmd;
68- | None -> ()
69+ match callback with Some cmd -> Sys.command_exn cmd | None -> ()
70
71 let create_on_change ~callback ~editor content dest =
72 let tmp_file = Filename.temp_file "note" ".md" in
73 diff --git a/lib/note.mli b/lib/note.mli
74index fe79e2e..5c549b7 100644
75--- a/lib/note.mli
76+++ b/lib/note.mli
77 @@ -1,6 +1,6 @@
78 type t
79
80- val build : title:string -> tags:string list -> content: string -> t
81+ val build : title:string -> tags:string list -> content:string -> t
82 (** build a new note *)
83
84 val get_title : t -> string
85 @@ -29,7 +29,7 @@ val read_note_exn : path:string -> t
86 val read_notes : paths:string list -> t list
87 (** read all of the note paths raising an exception of any failure *)
88
89- val read_notes_with_paths : paths: string list -> (t * string) list
90+ val read_notes_with_paths : paths:string list -> (t * string) list
91 (** read all of the note paths returning a tuple of note and it's associated path rasiing an exception on any failure *)
92
93 val filter : t list -> string list -> t list