Skip to content

Commit 247fcd6

Browse files
committed
doc: fix odoc markups
1 parent 603b8c5 commit 247fcd6

6 files changed

+41
-28
lines changed

src/app/learnocaml_common.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ val get_state_as_save_file : ?include_reports:bool -> unit -> Save.t
121121
(** Sync the local save state with the server state, and returns the merged save
122122
file. The save will be created on the server if it doesn't exist.
123123
124-
This syncs student {b,content}, but never the reports which are only synched
124+
This syncs student {b content}, but never the reports which are only synched
125125
on "Grade" *)
126126
val sync: Token.t -> Save.t Lwt.t
127127

src/app/learnocaml_config.mli

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
* Learn-OCaml is distributed under the terms of the MIT license. See the
66
* included LICENSE file for details. *)
77

8-
(* This is not transpiled to learnocaml-static.js, but is an interface
8+
(** This is not transpiled to learnocaml-static.js, but is an interface
99
to the values stored in this file. It is "statically linked" with
1010
learnocaml-common.ml. *)
1111

12+
module Js = Js_of_ocaml.Js
13+
1214
class type learnocaml_config = object
1315
method enableTryocaml: bool Js.optdef_prop
1416
method enableLessons: bool Js.optdef_prop

src/grader/test_lib.mli

+23-14
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ module type S = sig
267267
val test : 'a tester
268268

269269
(** [test_ignore] is a {!S.tester} that compares only the constructor of its
270-
{S.result} inputs. The content is ignored. If the constructors
270+
{!S.result} inputs. The content is ignored. If the constructors
271271
match, an empty report is returned. *)
272272
val test_ignore : 'a tester
273273

@@ -284,7 +284,7 @@ module type S = sig
284284
val test_eq_exn : (exn -> exn -> bool) -> 'a tester
285285

286286
(** [test_canon canon] builds a {!S.tester} that compares its two
287-
{S.result} inputs after application to [canon] function with
287+
{!S.result} inputs after application to [canon] function with
288288
Ocaml structural equality. *)
289289
val test_canon : ('a result -> 'a result) -> 'a tester
290290

@@ -379,7 +379,7 @@ module type S = sig
379379
also made at this time and so mutate during solution
380380
execution. They can then be compared with [out.test].
381381
382-
[out.test] is a {S.tester} which actually builds two reports,
382+
[out.test] is a {!S.tester} which actually builds two reports,
383383
one using its optional argument [~test_result] and one that
384384
compares the values of the references set previously using
385385
[test_ref]. By default [~test_result] is equal to
@@ -581,7 +581,7 @@ module type S = sig
581581

582582
(** {3 Returned report}*)
583583

584-
(** The grading functions for functions return a {report} which
584+
(** The grading functions for functions return a {!report} which
585585
actually concatenated 4 reports generated by (in this order):
586586
587587
- the tester [~test]
@@ -1000,37 +1000,42 @@ module type S = sig
10001000
(** The various grading functions use numerous common optional
10011001
argument. Here is a list in alphabetic order of each of them.
10021002
1003-
{3 ?⁠after} defines a function which is called with the current
1003+
{3 ?⁠after}
1004+
defines a function which is called with the current
10041005
tested inputs, the student {!type:result} and the solution
10051006
{!type:result} and returns a new report which is concatenated to
10061007
reports built with [~test], [~test_sdtout] and [~test_sdterr].
10071008
Enables for example to inspect references introduced with
10081009
[~before], [~before_user] or [~before_reference] and build an
10091010
appropriate report. Default value is [fun _ _ _ -> []].
10101011
1011-
{3 ?before} defines a function called right before the application
1012+
{3 ?before}
1013+
defines a function called right before the application
10121014
of student function to the current tested inputs. Default value
10131015
is [fun _ -> ()]
10141016
10151017
For [test_function_<args_nb>] only.
10161018
1017-
{3 ?before_reference} defines a function called right before the
1019+
{3 ?before_reference}
1020+
defines a function called right before the
10181021
application of solution function to the current tested
10191022
inputs. This function is called {b before} student function
10201023
evaluation. Default value is [fun _ -> ()].
10211024
10221025
For [test_function_<args_nb>_against] and
10231026
[test_function_<args_nb>_against_solution].
10241027
1025-
{3 ?before_user} defines a function called right before the
1028+
{3 ?before_user}
1029+
defines a function called right before the
10261030
application of student function to the current tested
10271031
inputs. This function is called {b after} solution function
10281032
evaluation. Default value is [fun _ -> ()].
10291033
10301034
For [test_function_<args_nb>_against] and
10311035
[test_function_<args_nb>_against_solution].
10321036
1033-
{3 ?gen} Number of automatically generated tested inputs. Inputs
1037+
{3 ?gen}
1038+
Number of automatically generated tested inputs. Inputs
10341039
are generated using either sampler defined in the current
10351040
environment or function defined with [~sampler] optional
10361041
argument. By default, [gen] is [max 5 (10 - List.length
@@ -1041,7 +1046,8 @@ module type S = sig
10411046
10421047
See {{!Sampler.sampler_sec}Sampler module}.
10431048
1044-
{3 ?sampler} defines the function used to automatically generated
1049+
{3 ?sampler}
1050+
defines the function used to automatically generated
10451051
inputs. If unset, the grading function checks if a sampler is
10461052
defined for each input type in the current environment. Such
10471053
sampler for a type [some-type] must be named [sample_some-type]
@@ -1053,20 +1059,23 @@ module type S = sig
10531059
10541060
See {{!Sampler.sampler_sec}Sampler module}.
10551061
1056-
{3 ?test} defines the function used to compare the output of
1062+
{3 ?test}
1063+
defines the function used to compare the output of
10571064
student function and the output of solution function. Default
10581065
value is {!Tester.test}.
10591066
10601067
See {{!Tester.tester_sec}predefined testers and tester builders}.
10611068
1062-
{3 ?test_sdterr} defines the function used to compare the standard
1069+
{3 ?test_sdterr}
1070+
defines the function used to compare the standard
10631071
output produced by student function and the one produced by
10641072
solution function. Default value is {!Tester.io_test_ignore}.
10651073
10661074
See {{!Tester.io_tester_sec}predefined IO testers and IO tester
10671075
builders}.
10681076
1069-
{3 ?test_sdtout} defines the function used to compare the standard
1077+
{3 ?test_sdtout}
1078+
defines the function used to compare the standard
10701079
error produced by student function and the one produced by
10711080
solution function. Default value is {!Tester.io_test_ignore}.
10721081
@@ -1085,7 +1094,7 @@ module type S = sig
10851094

10861095
(** [run_timeout ?time v] executes [v()] under an optional time limit.
10871096
The exceptions raised by [v] are intentionally *not* caught,
1088-
so the caller is able to catch and get a backtrace, if desired.
1097+
so the caller is able to catch and get a backtrace, if desired.
10891098
If given, [time] overrides the global timeout parameter.
10901099
*)
10911100
val run_timeout : ?time:int -> (unit -> 'a) -> 'a

src/state/learnocaml_data.mli

+4-4
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,8 @@ module Exercise: sig
210210
Token.Set.t -> assignments -> (status * Token.Set.t) list
211211

212212
(** Computes the current set of skills from the base list (from Meta.t),
213-
using the mutable changes in the Status.skill list. E.g. {[
214-
get_skills ~base:meta.Meta.requirements st.skills_prereq
215-
]} *)
213+
using the mutable changes in the Status.skill list. E.g.
214+
{[get_skills ~base:meta.Meta.requirements st.skills_prereq]} *)
216215
val get_skills: base:string list -> skill list -> string list
217216

218217
(** The opposite of [get_skills]: retrieves the base from the already
@@ -226,7 +225,8 @@ module Exercise: sig
226225
val skills_focus: Meta.t -> t -> string list
227226

228227
(** Generates a skill list that can be saved, such that
229-
{[get_skills ~base (make_skills ~base l) = l]}.
228+
{[get_skills ~base (make_skills ~base l) = l]}
229+
.
230230
231231
Remember to call [skills_base] first on the base if you got the
232232
skills from the meta returned by the server. *)

src/toplevel/learnocaml_toplevel.mli

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type t
5353
the previous outputs are kept and marked as old
5454
(see {!Learnocaml_toplevel_output.oldify}). Otherwise, the output console is cleaned.
5555
@param input_sizing
56-
See (!Learnocaml_toplevel_input.sizing}.
56+
See {!Learnocaml_toplevel_input.sizing}.
5757
@param history
5858
The history storage to use. If none, a new volatile one is created.
5959
@param display_welcome
@@ -98,7 +98,7 @@ val make_flood_popup:
9898
9999
@param timeout
100100
See {!create}.
101-
@returns
101+
@return
102102
Returns [Success true] whenever the code was correctly
103103
typechecked and its evaluation did not raise an exception nor
104104
timeouted and [false] otherwise. *)
@@ -114,7 +114,7 @@ val execute_phrase: t ->
114114
Tells if answers of the toplevel are to be displayed.
115115
@param message
116116
Displays [(* message *)] where the code should have been echoed.
117-
@returns
117+
@return
118118
Returns [Success true] whenever the code was correctly
119119
typechecked and its evaluation did not raise an exception nor
120120
timeouted and [false] otherwise. *)
@@ -152,7 +152,7 @@ val prerr_string: t -> string -> unit
152152
val print_html: t -> string -> unit
153153

154154
(** scroll the view to show the last phrase.
155-
Calls {!Learnocaml_toplevel_output.scroll. *)
155+
Calls {!Learnocaml_toplevel_output.scroll}. *)
156156
val scroll: t -> unit
157157

158158
(** Execute the content of the input [textarea].

src/toplevel/learnocaml_toplevel_worker_caller.mli

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88

99
(** An unified interface for OCaml toplevels running in a Web Worker
1010
or not. This module signature is very simalar to the signature of
11-
{!module:Learnocaml_toplevel_toploop}, except: {ul {- all blocking functions
12-
will kill the underlying Web Worker when cancelled; a new worker
13-
will be spawned. } {- it uses function of type [string -> unit] as
14-
outputs instead of [Format.formatter].}}. *)
11+
{!module:Learnocaml_toplevel_toploop}, except:
12+
{ul
13+
{- all blocking functions will kill the underlying Web Worker when
14+
cancelled; a new worker will be spawned. }
15+
{- it uses function of type [string -> unit] as outputs instead
16+
of [Format.formatter].}} *)
1517

1618
open Toploop_results
1719

0 commit comments

Comments
 (0)