chore remove redundant .mli files that expose everything 1:1

These interfaces added no API restriction or meaningful documentation beyond what the .ml files already provide: highlight, highlight_grammars, list_ext, prose_plaintext, syntax, time_format.

Commit
98936a53c7659182c2f4d8f9c49f8c1834cbcc01
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
Changed files
lib/highlight.mli
index c72a9866..00000000 100644..000000
@@ -1,19 +0,0 @@
1 Removed: (** Server-side syntax highlighting engine.
2 Removed:
3 Removed: Tokenizes source code using TextMate grammars (via hilite) and produces
4 Removed: {!Dream_html.node} spans ready for embedding in the page. Falls back
5 Removed: gracefully to plain text when no grammar is available for the requested
6 Removed: language. *)
7 Removed:
8 Removed: type line = Dream_html.node list
9 Removed: (** A single highlighted line: a list of HTML nodes (spans with classes). *)
10 Removed:
11 Removed: val highlight : lang:string option -> string -> line list
12 Removed: (** [highlight ~lang source] tokenizes [source] and returns styled lines.
13 Removed:
14 Removed: When [lang] is [None] or the language is not supported, returns plain-text
15 Removed: lines (no spans, just escaped text).
16 Removed:
17 Removed: The CSS classes follow hilite's convention:
18 Removed: [{lang_scope}-{token_scope_segments}], e.g.
19 Removed: [source.python-storage-type-function]. *)
lib/highlight_grammars.mli
index 47039737..00000000 100644..000000
@@ -1,14 +0,0 @@
1 Removed: (** Registry of bundled TextMate grammars for syntax highlighting.
2 Removed:
3 Removed: Loads grammars embedded at build time via [ocaml-crunch] and registers them
4 Removed: with a shared {!TmLanguage.t} instance. Language lookup is by the canonical
5 Removed: name string produced by {!Syntax.detect}. *)
6 Removed:
7 Removed: val registry : TmLanguage.t Lazy.t
8 Removed: (** The shared grammar registry, lazily initialised. All bundled grammars are
9 Removed: registered on first force. *)
10 Removed:
11 Removed: val scope_of_lang : string -> string option
12 Removed: (** Map a canonical language name (as returned by {!Syntax.detect}) to the
13 Removed: TextMate scope name used by the grammar file. Returns [None] for languages
14 Removed: without a bundled grammar. *)
lib/list_ext.mli
index d724ca11..00000000 100644..000000
@@ -1,9 +0,0 @@
1 Removed: (** List utilities not in the OCaml 5.2 stdlib. *)
2 Removed:
3 Removed: val take : int -> 'a list -> 'a list
4 Removed: (** [take n l] returns up to the first [n] elements of [l]. Returns fewer if the
5 Removed: list is shorter than [n]. *)
6 Removed:
7 Removed: val drop : int -> 'a list -> 'a list
8 Removed: (** [drop n l] removes the first [n] elements of [l]. Returns the empty list if
9 Removed: [n] exceeds the list length. *)
lib/prose/prose_plaintext.mli
index 9cadde64..00000000 100644..000000
@@ -1,6 +0,0 @@
1 Removed: (** Plain text documentation format.
2 Removed:
3 Removed: Each non-blank line becomes a paragraph. No inline markup is applied. *)
4 Removed:
5 Removed: val format : Prose_format.format
6 Removed: (** The plain text format descriptor, for [.txt] files and fallback cases. *)
lib/syntax.mli
index 8bd0d38d..00000000 100644..000000
@@ -1,32 +0,0 @@
1 Removed: (** Guessing a file's language for syntax highlighting.
2 Removed:
3 Removed: Detection is best-effort and purely advisory: the blob renders identically
4 Removed: whether or not a language is found, so a wrong guess degrades to plain text
5 Removed: rather than breaking the page.
6 Removed:
7 Removed: Sources are tried in descending order of reliability: the filename
8 Removed: extension, then a shebang, then an Emacs file variable, then a Vim modeline.
9 Removed: *)
10 Removed:
11 Removed: val of_filename : string -> string option
12 Removed: (** Detect language from a filename or its extension. Recognises well-known
13 Removed: extensionless files (Makefile, Dockerfile, dune) as well as common
14 Removed: extensions. *)
15 Removed:
16 Removed: val of_shebang : string -> string option
17 Removed: (** Detect language from a [#!] line. Handles [env] indirection and strips
18 Removed: version suffixes. *)
19 Removed:
20 Removed: val of_emacs_variables : string -> string option
21 Removed: (** Detect language from an Emacs [-*- mode: ... -*-] file variable line. *)
22 Removed:
23 Removed: val of_vim_modeline : string -> string option
24 Removed: (** Detect language from a Vim [ft=] or [filetype=] modeline. *)
25 Removed:
26 Removed: val of_content : string -> string option
27 Removed: (** Inspect the first and last five lines for shebangs, Emacs variables, or Vim
28 Removed: modelines. *)
29 Removed:
30 Removed: val detect : filename:string option -> string -> string option
31 Removed: (** [detect ~filename content] returns a canonical language name. Prefers the
32 Removed: filename when available, falling back to markers inside the content. *)
lib/views/time_format.mli
index 9fb46e70..00000000 100644..000000
@@ -1,20 +0,0 @@
1 Removed: (** Formatting Git dates for display.
2 Removed:
3 Removed: Git records a commit date as a Unix timestamp plus the offset of the zone
4 Removed: the author was in. Relative and short forms drop that offset and use the
5 Removed: server's local zone, which is what a reader scanning a list wants; the
6 Removed: detailed form preserves it, because on a single commit the author's own
7 Removed: wall-clock time is the meaningful one. *)
8 Removed:
9 Removed: val relative_time : int64 * 'a -> string
10 Removed: (** A human-friendly relative duration such as ["3 days ago"] or ["just now"].
11 Removed: The timezone offset is ignored; comparison is against the server's current
12 Removed: time. *)
13 Removed:
14 Removed: val short_time : int64 * 'a -> string
15 Removed: (** Minute-precision server-local time, formatted as [YYYY-MM-DD HH:MM]. *)
16 Removed:
17 Removed: val exact_time : int64 * Git.User.tz_offset option -> string * string
18 Removed: (** Second-precision time in the recorded zone. Returns a pair of
19 Removed: [(machine_readable, human_readable)] strings, where the first is suitable
20 Removed: for a [datetime] attribute and the second for display. *)