Skip to content

Commit 3699f24

Browse files
authored
Merge pull request #1023 from stan-dev/module-doc-cleanup
Update module docs
2 parents 69b60a1 + 7706430 commit 3699f24

26 files changed

+79
-113
lines changed

src/common/Fixed.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
(** This module defines the signatures and [Make] functors for the 'fixed point'
22
(or two-level) type we use for our intermediate representations
33
*)
4+
45
open Core_kernel
56

67
(** The fixed-point of [Pattern.t] annotated with some meta-data *)

src/common/Gensym.mli

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
(** Generate fresh (never before used) symbols.
2+
3+
Uses an internal (mutable) counter
4+
*)
5+
16
val generate : ?prefix:string -> unit -> string
27
val enter : unit -> string * (unit -> unit)
38
val reset_danger_use_cautiously : unit -> unit

src/common/Specialized.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This specialization is useful since we end up with a concrete type of kind [*]
77
the analysis and optimization code, we work with map's and sets of our IR types
88
a lot and this approach makes the types much nicer to work with.
99
*)
10+
1011
open Core_kernel
1112

1213
(** Signature of all meta data used to annotate IRs *)

src/frontend/Input_warnings.mli

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
(** A module to contain the mutable state used to track warnings from the
2+
parser and lexer.
3+
*)
4+
15
val init : unit -> unit
26
(** As something of a hack, Input_warnings keeps track of which warnings the lexer has
37
emitted as a form of hidden state, which must be initialized and [collect]ed.*)

src/frontend/Parse.mli

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
(** Some complicated stuff to get the custom syntax errors out of Menhir's Incremental
22
API *)
3+
34
open Core_kernel
45

56
val parse_file :

src/frontend/Pretty_printing.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ let get_comments end_loc =
1616
let rec go ls =
1717
match ls with
1818
| LineComment (s, ({Middle.Location_span.begin_loc; _} as loc)) :: tl
19-
when Middle.Location.compare_loc begin_loc end_loc < 0 ->
19+
when Middle.Location.compare begin_loc end_loc < 0 ->
2020
(false, [s], loc) :: go tl
2121
| BlockComment (s, ({Middle.Location_span.begin_loc; _} as loc)) :: tl
22-
when Middle.Location.compare_loc begin_loc end_loc < 0 ->
22+
when Middle.Location.compare begin_loc end_loc < 0 ->
2323
(true, s, loc) :: go tl
24-
| Comma loc :: tl when Middle.Location.compare_loc loc end_loc < 0 -> go tl
24+
| Comma loc :: tl when Middle.Location.compare loc end_loc < 0 -> go tl
2525
| _ ->
2626
comments := ls ;
2727
[]
@@ -32,10 +32,10 @@ let get_comments_until_comma end_loc =
3232
let rec go ls =
3333
match ls with
3434
| LineComment (s, ({Middle.Location_span.begin_loc; _} as loc)) :: tl
35-
when Middle.Location.compare_loc begin_loc end_loc < 0 ->
35+
when Middle.Location.compare begin_loc end_loc < 0 ->
3636
(false, [s], loc) :: go tl
3737
| BlockComment (s, ({Middle.Location_span.begin_loc; _} as loc)) :: tl
38-
when Middle.Location.compare_loc begin_loc end_loc < 0 ->
38+
when Middle.Location.compare begin_loc end_loc < 0 ->
3939
(true, s, loc) :: go tl
4040
| _ ->
4141
comments := ls ;

src/frontend/Warnings.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
(** Used for user-facing warning messages *)
2+
13
type t = Middle.Location_span.t * string
24

35
val pp : ?printed_filename:string -> t Fmt.t

src/middle/Compiler.ml

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

src/middle/Expr.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
(** MIR types and modules corresponding to the expressions of the language *)
2+
13
open Core_kernel
24
open Common
35

src/middle/Fun_kind.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
(** Types for function kinds, e.g. [StanLib] or [UserDefined], and
2+
function suffix types, e.g. [foo_ldfp], [bar_lp]
3+
*)
4+
15
open Core_kernel
26

37
type 'propto suffix = FnPlain | FnRng | FnLpdf of 'propto | FnTarget

0 commit comments

Comments
 (0)