Skip to content

Commit

Permalink
Fix formatting in OCaml snippets (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
jubnzv authored Nov 2, 2021
1 parent 26b0714 commit 0af503a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/content/1.8/code/ocaml/snippet01.ml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
5 changes: 4 additions & 1 deletion src/content/1.8/code/ocaml/snippet09.ml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/content/1.8/code/ocaml/snippet14.ml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion src/content/3.2/code/ocaml/snippet06.ml
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
3 changes: 2 additions & 1 deletion src/content/3.8/code/ocaml/snippet31.ml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0af503a

Please sign in to comment.