From 142a2d25fa15ba3624c82739ec16a54da477937d Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 24 May 2018 22:53:59 +0200 Subject: [PATCH] Allow lowercase in symmetries --- ocaml/Symmetry.ml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/ocaml/Symmetry.ml b/ocaml/Symmetry.ml index 7b088b73..4cf84f2d 100644 --- a/ocaml/Symmetry.ml +++ b/ocaml/Symmetry.ml @@ -16,30 +16,30 @@ let to_string = function | L -> "L" let of_string = function - | "S" -> S - | "P" -> P - | "D" -> D - | "F" -> F - | "G" -> G - | "H" -> H - | "I" -> I - | "J" -> J - | "K" -> K - | "L" -> L + | "S" | "s" -> S + | "P" | "p" -> P + | "D" | "d" -> D + | "F" | "f" -> F + | "G" | "g" -> G + | "H" | "h" -> H + | "I" | "i" -> I + | "J" | "j" -> J + | "K" | "k" -> K + | "L" | "l" -> L | x -> raise (Failure ("Symmetry should be S|P|D|F|G|H|I|J|K|L, not "^x^".")) let of_char = function - | 'S' -> S - | 'P' -> P - | 'D' -> D - | 'F' -> F - | 'G' -> G - | 'H' -> H - | 'I' -> I - | 'J' -> J - | 'K' -> K - | 'L' -> L + | 'S' | 's' -> S + | 'P' | 'p' -> P + | 'D' | 'd' -> D + | 'F' | 'f' -> F + | 'G' | 'g' -> G + | 'H' | 'h' -> H + | 'I' | 'i' -> I + | 'J' | 'j' -> J + | 'K' | 'k' -> K + | 'L' | 'l' -> L | x -> raise (Failure ("Symmetry should be S|P|D|F|G|H|I|J|K|L")) let to_l = function