diff options
Diffstat (limited to 'src/course.ml')
-rw-r--r-- | src/course.ml | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/course.ml b/src/course.ml index 4b9c914..5ce2564 100644 --- a/src/course.ml +++ b/src/course.ml @@ -49,20 +49,20 @@ let replace_entities str = type loc_and_sum = | Nothing | Groups of string list - | Location of string list * string - | Summary of string list * string * string + | Summary of string list * string + | Location of string list * string * string let loc_and_sum_to_groups = function | Nothing -> [] - | Groups groups | Location (groups, _) | Summary (groups, _, _) -> groups + | Groups groups | Summary (groups, _) | Location (groups, _, _) -> groups let loc_and_sum_to_location = function - | Nothing | Groups _ -> "" - | Location (_, location) | Summary (_, location, _) -> location + | Nothing | Groups _ | Summary _ -> "" + | Location (_, _, location) -> location let loc_and_sum_to_summary category = function - | Nothing | Groups _ | Location _ -> category - | Summary (_, _, summary) -> + | Nothing | Groups _ -> category + | Summary (_, summary) | Location (_, summary, _) -> let summary = match Astring.String.cut ~sep:" - " summary with | None -> summary | Some (_, str) -> str in @@ -90,9 +90,9 @@ let location_and_summary str = let parts = Astring.String.cuts ~empty:false ~sep str in List.fold_right (fun str -> function | Nothing -> check_groups str - | Groups groups -> Location (groups, replace_entities str) - | Location (groups, summary) -> Summary (groups, replace_entities str, summary) - | Summary _ as res -> res) + | Groups groups -> Summary (groups, replace_entities str) + | Summary (groups, summary) -> Location (groups, summary, replace_entities str) + | Location _ as res -> res) parts Nothing let date = |