-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Luke Maurer <[email protected]>
- Loading branch information
1 parent
41b8f8f
commit 2d98e61
Showing
15 changed files
with
458 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type t = P.t | ||
|
||
let create = P.create | ||
let wrap t = t | ||
let p t = t | ||
let to_string t = "Basic(" ^ P.to_string t ^ ")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(** Basic functionality implemented over the [P] parameter. *) | ||
|
||
(** A [P.t] with minor enhancements. *) | ||
type t | ||
|
||
(** Make a [t] from scratch. *) | ||
val create : unit -> t | ||
|
||
(** Make a [t] from a [P.t]. *) | ||
val wrap : P.t -> t | ||
|
||
val p : t -> P.t | ||
|
||
(** Convert [t] to string. *) | ||
val to_string : t -> string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type t = Basic.t | ||
|
||
let create t = t | ||
let wrap t = Basic.wrap t | ||
let to_string t = "Fancy(" ^ Basic.to_string t ^ ")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type t | ||
|
||
(** Make something fancy out of something basic. *) | ||
val create : Basic.t -> t | ||
val wrap : P.t -> t | ||
val to_string : t -> string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
(** A parameter module. *) | ||
|
||
(** A thing. *) | ||
type t | ||
|
||
(** Make a thing. *) | ||
val create : unit -> t | ||
|
||
(** Frobnicate the thing. *) | ||
val frob : t -> t | ||
|
||
(** Show the thing. *) | ||
val to_string : t -> string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type t = int | ||
|
||
let create () = 0 | ||
let frob = succ | ||
let to_string = string_of_int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type t = int | ||
|
||
val create : unit -> t | ||
val frob : t -> t | ||
val to_string : t -> string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(** An alias to the parameter [P] *) | ||
module As_alias = P | ||
|
||
module Included = struct | ||
include P | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(** An alias to the parameter [P] *) | ||
module As_alias = P | ||
|
||
module Included : sig | ||
include module type of struct | ||
include P | ||
end | ||
end |
Oops, something went wrong.