From 0af503a97b19aa1ba983bbba50df0812afe9ae34 Mon Sep 17 00:00:00 2001 From: Georgiy Komarov Date: Tue, 2 Nov 2021 11:38:02 +0300 Subject: [PATCH] Fix formatting in OCaml snippets (#279) --- src/content/1.8/code/ocaml/snippet01.ml | 3 ++- src/content/1.8/code/ocaml/snippet09.ml | 5 ++++- src/content/1.8/code/ocaml/snippet14.ml | 4 +++- src/content/3.2/code/ocaml/snippet06.ml | 3 ++- src/content/3.8/code/ocaml/snippet31.ml | 3 ++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/content/1.8/code/ocaml/snippet01.ml b/src/content/1.8/code/ocaml/snippet01.ml index 050e23df..b2ab138a 100644 --- a/src/content/1.8/code/ocaml/snippet01.ml +++ b/src/content/1.8/code/ocaml/snippet01.ml @@ -1,4 +1,5 @@ -(** You can represent bifunctor defintion in two forms and implement just and derive the other from it. *) +(** You can represent bifunctor defintion in two forms and implement + just and derive the other from it. *) module type BifunctorCore = sig type ('a, 'b) t diff --git a/src/content/1.8/code/ocaml/snippet09.ml b/src/content/1.8/code/ocaml/snippet09.ml index d2f0eceb..e0729968 100644 --- a/src/content/1.8/code/ocaml/snippet09.ml +++ b/src/content/1.8/code/ocaml/snippet09.ml @@ -1,4 +1,7 @@ -(** OCaml doesn't support higher kinded types. So, we have to use module functors to emulate the behavior higher kinded types. There's less verbose options using type defunctionalization but it's more advanced and obscures the flow of this book *) +(** OCaml doesn't support higher kinded types. So, we have to use + module functors to emulate the behavior higher kinded types. + There's less verbose options using type defunctionalization + but it's more advanced and obscures the flow of this book *) module type BiComp = functor (BF : sig type ('a, 'b) t diff --git a/src/content/1.8/code/ocaml/snippet14.ml b/src/content/1.8/code/ocaml/snippet14.ml index b6bc4faf..0667b922 100644 --- a/src/content/1.8/code/ocaml/snippet14.ml +++ b/src/content/1.8/code/ocaml/snippet14.ml @@ -1,4 +1,6 @@ -(** Deriving a functor in OCaml is not available as a language extension. You could try experimental library like ocsigen to derive functors.*) +(** Deriving a functor in OCaml is not available as a language + extension. You could try experimental library like ocsigen + to derive functors.*) type 'a tree = | Leaf of 'a | Node of 'a tree * 'a tree diff --git a/src/content/3.2/code/ocaml/snippet06.ml b/src/content/3.2/code/ocaml/snippet06.ml index 818c149b..c11dd39e 100644 --- a/src/content/3.2/code/ocaml/snippet06.ml +++ b/src/content/3.2/code/ocaml/snippet06.ml @@ -1,4 +1,5 @@ -(* Putting it all together to show the equivalence between unit/counit and left_adjunct/right_adjunct *) +(* Putting it all together to show the equivalence between + unit/counit and left_adjunct/right_adjunct *) module type Adjunction = functor (F : Functor) (U : Representable) diff --git a/src/content/3.8/code/ocaml/snippet31.ml b/src/content/3.8/code/ocaml/snippet31.ml index bdc9afb7..f0d36662 100644 --- a/src/content/3.8/code/ocaml/snippet31.ml +++ b/src/content/3.8/code/ocaml/snippet31.ml @@ -1,2 +1,3 @@ -(* Gen.t is used to represent infinite data structures like haskell's lazy list *) +(* Gen.t is used to represent infinite data structures like haskell's + lazy list *) val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a Gen.t