Add Cm_kind.to_sexp conversion

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-08-31 13:10:59 +03:00
parent 366c102aa0
commit 161ca64030
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,5 @@
open Stdune
type t = Cmi | Cmo | Cmx
let all = [Cmi; Cmo; Cmx]
@ -35,3 +37,10 @@ module Dict = struct
; cmx = x
}
end
let to_sexp =
let open Sexp.To_sexp in
function
| Cmi -> string "cmi"
| Cmo -> string "cmo"
| Cmx -> string "cmx"

View File

@ -1,3 +1,5 @@
open Stdune
type t = Cmi | Cmo | Cmx
val all : t list
@ -5,6 +7,8 @@ val all : t list
val ext : t -> string
val source : t -> Ml_kind.t
val to_sexp : t Sexp.To_sexp.t
module Dict : sig
type cm_kind = t