mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-13 17:43:55 +01:00
30 lines
541 B
OCaml
30 lines
541 B
OCaml
|
open Core.Std;;
|
||
|
|
||
|
type t =
|
||
|
| Guess
|
||
|
| Canonical
|
||
|
| Natural
|
||
|
| Localized
|
||
|
| None
|
||
|
with sexp
|
||
|
;;
|
||
|
|
||
|
let to_string = function
|
||
|
| Guess -> "Guess"
|
||
|
| Canonical -> "Canonical"
|
||
|
| Natural -> "Natural"
|
||
|
| Localized -> "Localized"
|
||
|
| None -> "None"
|
||
|
;;
|
||
|
|
||
|
let of_string s =
|
||
|
match String.lowercase s with
|
||
|
| "guess" -> Guess
|
||
|
| "canonical" -> Canonical
|
||
|
| "natural" -> Natural
|
||
|
| "localized" -> Localized
|
||
|
| "none" -> None
|
||
|
| _ -> failwith "MO_label should be one of:
|
||
|
Guess | Canonical | Natural | Localized | None."
|
||
|
;;
|