Skip to content

Commit a2202cf

Browse files
committed
Formatting.
Closes #25
1 parent 7a8ef98 commit a2202cf

30 files changed

+735
-740
lines changed

.ocp-indent

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
normal
22
with=0
33
syntax=lwt mll
4+
max_indent=2

format.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

lib/html5.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* You should have received a copy of the GNU Lesser General Public License
1616
* along with this program; if not, write to the Free Software
1717
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02111-1307, USA.
18-
*)
18+
*)
1919

2020
module M = Html5_f.Make(Xml)(Svg.M)
2121

lib/html5.mli

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@
1515
* You should have received a copy of the GNU Lesser General Public License
1616
* along with this program; if not, write to the Free Software
1717
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02111-1307, USA.
18-
*)
18+
*)
1919

2020
(** Typesafe constructors and printers for HTML5 documents.
2121
2222
@see <http://www.w3.org/TR/html5/> W3C Recommendation *)
2323

2424
(** Concrete implementation of HTML5 typesafe constructors *)
2525
module M : Html5_sigs.T with type Xml.uri = Xml.uri
26-
and type Xml.event_handler = Xml.event_handler
27-
and type Xml.attrib = Xml.attrib
28-
and type Xml.elt = Xml.elt
29-
and type 'a Xml.wrap = 'a
30-
and type 'a wrap = 'a
31-
and module Svg := Svg.M
26+
and type Xml.event_handler = Xml.event_handler
27+
and type Xml.attrib = Xml.attrib
28+
and type Xml.elt = Xml.elt
29+
and type 'a Xml.wrap = 'a
30+
and type 'a wrap = 'a
31+
and module Svg := Svg.M
3232

3333
(** Simple printer for HTML5 documents *)
3434
module P : Xml_sigs.Typed_simple_printer with type 'a elt := 'a M.elt
35-
and type doc := M.doc
35+
and type doc := M.doc
3636

3737
(** Parametrized stream printer for HTML5 documents *)
3838
module Make_printer(O : Xml_sigs.Output) :
39-
Xml_sigs.Typed_printer with type out := O.out
40-
and type 'a elt := 'a M.elt
41-
and type doc := M.doc
39+
Xml_sigs.Typed_printer with type out := O.out
40+
and type 'a elt := 'a M.elt
41+
and type doc := M.doc

lib/html5_f.ml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* You should have received a copy of the GNU Lesser General Public License
1818
* along with this program; if not, write to the Free Software
1919
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02111-1307, USA.
20-
*)
20+
*)
2121

2222
(* TODO :
2323
- MathML and SVG
@@ -325,7 +325,7 @@ module MakeWrapped
325325

326326
let a_onmessage = event_attrib "onmessage"
327327

328-
(* Other Attributes *)
328+
(* Other Attributes *)
329329
let a_version = string_attrib "version"
330330

331331
let a_xmlns x =
@@ -557,10 +557,10 @@ module MakeWrapped
557557
let a_sandbox sb =
558558
let rec aux sb =
559559
match sb with
560-
| `AllowSameOrigin :: a -> "allow-same-origin" :: (aux a)
561-
| `AllowForms :: a -> "allow-forms" :: (aux a)
562-
| `AllowScript :: a -> "allow-script" :: (aux a)
563-
| [] -> []
560+
| `AllowSameOrigin :: a -> "allow-same-origin" :: (aux a)
561+
| `AllowForms :: a -> "allow-forms" :: (aux a)
562+
| `AllowScript :: a -> "allow-script" :: (aux a)
563+
| [] -> []
564564
in space_sep_attrib "sandbox" (W.fmap aux sb)
565565

566566
let a_spellcheck sc =
@@ -957,37 +957,37 @@ module MakeWrapped
957957
let rp ?(a = []) elts = (a, elts)
958958

959959
let rt ?rp ?a elts =
960-
match rp with
961-
| Some ((a1, e1), (a2, e2)) ->
962-
`Rpt (Xml.node ~a: a1 "rp" e1, Xml.node ?a "rt" elts,
960+
match rp with
961+
| Some ((a1, e1), (a2, e2)) ->
962+
`Rpt (Xml.node ~a: a1 "rp" e1, Xml.node ?a "rt" elts,
963963
Xml.node ~a: a2 "rp" e2)
964-
| None -> `Rt (Xml.node ?a "rt" elts)
964+
| None -> `Rt (Xml.node ?a "rt" elts)
965965

966966
let ruby ?a elt elts =
967967
let rec aux =
968-
function
969-
| [] -> []
970-
| (pel, `Rt e) :: l -> pel @ (e :: (aux l))
971-
| (pel, `Rpt (e1, e2, e3)) :: l -> pel @ (e1 :: e2 :: e3 :: (aux l))
968+
function
969+
| [] -> []
970+
| (pel, `Rt e) :: l -> pel @ (e :: (aux l))
971+
| (pel, `Rpt (e1, e2, e3)) :: l -> pel @ (e1 :: e2 :: e3 :: (aux l))
972972
in
973973
let l = W.(bind elt (fun x -> bind elts (fun y -> return (x :: y))))
974974
in Xml.node ?a "ruby" (W.fmap aux l)
975975

976976
let wbr = terminal "wbr"
977977

978-
(* VB *)
979-
type shape = [ | `Rect | `Circle | `Poly | `Default ]
978+
(* VB *)
979+
type shape = [ | `Rect | `Circle | `Poly | `Default ]
980980

981981
let bdo ~dir ?(a = []) elts = Xml.node ~a: ((a_dir dir) :: a) "bdo" elts
982982

983983
let a_datetime = string_attrib "datetime"
984984

985985
let a_shape d =
986-
let f = function | `Rect -> "rect"
987-
| `Circle -> "circle"
988-
| `Poly -> "poly"
989-
| `Default -> "default"
990-
in user_attrib f "shape" d
986+
let f = function | `Rect -> "rect"
987+
| `Circle -> "circle"
988+
| `Poly -> "poly"
989+
| `Default -> "default"
990+
in user_attrib f "shape" d
991991

992992
let a_coords coords =
993993
let f c = String.concat "," (List.map string_of_int c)
@@ -1019,8 +1019,8 @@ module MakeWrapped
10191019
let video_audio name ?src ?(srcs=W.return []) ?(a = []) elts =
10201020
let a =
10211021
match src with
1022-
| None -> a
1023-
| Some uri -> (a_src uri) :: a
1022+
| None -> a
1023+
| Some uri -> (a_src uri) :: a
10241024
in
10251025
plus_concat ~a name srcs elts
10261026

@@ -1031,7 +1031,7 @@ module MakeWrapped
10311031
let canvas = star "canvas"
10321032

10331033
let command ~label ?(a = []) () =
1034-
Xml.leaf ~a: ((a_label label) :: a) "command"
1034+
Xml.leaf ~a: ((a_label label) :: a) "command"
10351035

10361036
let menu ?child ?a () =
10371037
let child = opt_fmap (fun x -> li_option (Some x)) child (li_option None) in
@@ -1089,10 +1089,10 @@ module MakeWrapped
10891089
let add_caption caption elts = match caption with
10901090
| None -> elts
10911091
| Some x ->
1092-
let f c elts = match c with
1093-
| `Top figc -> figc :: elts
1094-
| `Bottom figc -> elts @ [figc]
1095-
in W.fmap2 f x elts
1092+
let f c elts = match c with
1093+
| `Top figc -> figc :: elts
1094+
| `Bottom figc -> elts @ [figc]
1095+
in W.fmap2 f x elts
10961096
in
10971097
let content = add_caption figcaption elts in
10981098
Xml.node ?a "figure" content
@@ -1137,7 +1137,7 @@ module MakeWrapped
11371137

11381138
let img ~src ~alt ?(a = []) () =
11391139
let a = (a_src src) :: (a_alt alt) :: a in
1140-
Xml.leaf ~a "img"
1140+
Xml.leaf ~a "img"
11411141

11421142
let meta = terminal "meta"
11431143

lib/html5_f.mli

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717
* You should have received a copy of the GNU Lesser General Public License
1818
* along with this program; if not, write to the Free Software
1919
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02111-1307, USA.
20-
*)
20+
*)
2121

2222
(** Typesafe constructors for HTML5 documents (Functorial interface) *)
2323

2424
module Make(Xml : Xml_sigs.T)(Svg : Svg_sigs.T with module Xml := Xml)
2525
: Html5_sigs.T with type Xml.uri = Xml.uri
26-
and type Xml.event_handler = Xml.event_handler
27-
and type Xml.attrib = Xml.attrib
28-
and type Xml.elt = Xml.elt
29-
and module Svg := Svg
30-
and type +'a elt = Xml.elt
31-
and type 'a Xml.wrap = 'a
32-
and type 'a wrap = 'a
33-
and type 'a attrib = Xml.attrib
34-
and type uri = Xml.uri
26+
and type Xml.event_handler = Xml.event_handler
27+
and type Xml.attrib = Xml.attrib
28+
and type Xml.elt = Xml.elt
29+
and module Svg := Svg
30+
and type +'a elt = Xml.elt
31+
and type 'a Xml.wrap = 'a
32+
and type 'a wrap = 'a
33+
and type 'a attrib = Xml.attrib
34+
and type uri = Xml.uri
3535

3636
(** Like the {! Html5_f.Make } functor, but allows to wrap elements inside a monad described by {! Xml_wrap.T}.
3737
See the functorial interface documentation for more details. *)
@@ -40,12 +40,12 @@ module MakeWrapped
4040
(Xml : Xml_sigs.Wrapped with type 'a wrap = 'a W.t)
4141
(Svg : Svg_sigs.T with module Xml := Xml)
4242
: Html5_sigs.T with type Xml.uri = Xml.uri
43-
and type Xml.event_handler = Xml.event_handler
44-
and type Xml.attrib = Xml.attrib
45-
and type Xml.elt = Xml.elt
46-
and module Svg := Svg
47-
and type +'a elt = Xml.elt
48-
and type 'a Xml.wrap = 'a W.t
49-
and type 'a wrap = 'a W.t
50-
and type 'a attrib = Xml.attrib
51-
and type uri = Xml.uri
43+
and type Xml.event_handler = Xml.event_handler
44+
and type Xml.attrib = Xml.attrib
45+
and type Xml.elt = Xml.elt
46+
and module Svg := Svg
47+
and type +'a elt = Xml.elt
48+
and type 'a Xml.wrap = 'a W.t
49+
and type 'a wrap = 'a W.t
50+
and type 'a attrib = Xml.attrib
51+
and type uri = Xml.uri

0 commit comments

Comments
 (0)