blob: 4485958126b3f3cef8a9b4d2aa80487e057916a5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
open Sexplib0.Sexp_conv
(* Scripture references only -- never scripture text (spec §1: that is lectio's
job). *)
type part = First | Psalm | Second | Gospel | Tract | Alleluia | Sequence
[@@deriving sexp]
let all_parts = [ First; Psalm; Second; Gospel; Tract; Alleluia; Sequence ]
let part_to_string = function
| First -> "first" | Psalm -> "psalm" | Second -> "second" | Gospel -> "gospel"
| Tract -> "tract" | Alleluia -> "alleluia" | Sequence -> "sequence"
let part_of_string = function
| "first" -> Some First | "psalm" -> Some Psalm | "second" -> Some Second
| "gospel" -> Some Gospel | "tract" -> Some Tract | "alleluia" -> Some Alleluia
| "sequence" -> Some Sequence | _ -> None
type t = { part : part; reference : string } [@@deriving sexp]
|