From b8b1b6704069497d9ccbbe35db3c5a17b2f9bc4c Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sat, 5 Feb 2022 14:51:58 +0100 Subject: ics: make Ics.t public To simplify code down the line, this makes Ics.t public so everyone can apply standard list processing functions onto it. Signed-off-by: Alban Gruin --- src/course.ml | 3 +-- src/ics.ml | 3 +-- src/ics.mli | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/course.ml b/src/course.ml index 566ee0d..a621a8d 100644 --- a/src/course.ml +++ b/src/course.ml @@ -1,5 +1,5 @@ (* - * Copyright (C) 2020, 2021 Alban Gruin + * Copyright (C) 2020 -- 2022 Alban Gruin * * ucs is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published @@ -124,4 +124,3 @@ let decode s = | s -> Ezjsonm.from_string s in J.(destruct (list encoding) toks) |> List.filter_map (fun event -> event) - |> Ics.make diff --git a/src/ics.ml b/src/ics.ml index 0f8c7d6..5afff39 100644 --- a/src/ics.ml +++ b/src/ics.ml @@ -1,5 +1,5 @@ (* - * Copyright (C) 2020, 2021 Alban Gruin + * Copyright (C) 2020 -- 2022 Alban Gruin * * ucs is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published @@ -77,7 +77,6 @@ end type t = Event.t list -let make events = events let filter_groups groups = List.filter (Event.has_groups groups) diff --git a/src/ics.mli b/src/ics.mli index c2db3a2..575e88e 100644 --- a/src/ics.mli +++ b/src/ics.mli @@ -1,5 +1,5 @@ (* - * Copyright (C) 2020, 2021 Alban Gruin + * Copyright (C) 2020 -- 2022 Alban Gruin * * ucs is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published @@ -24,9 +24,8 @@ module Event : sig val to_string : string -> t -> int -> string end -type t +type t = Event.t list -val make : Event.t list -> t val filter_groups : string list -> t -> t val get_all_groups : t -> string Seq.t val to_string : string -> t -> string -- cgit v1.2.1