10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-04 21:24:02 +01:00

Allow lowercase in symmetries

This commit is contained in:
Anthony Scemama 2018-05-24 22:53:59 +02:00
parent db6ab659a1
commit 142a2d25fa

View File

@ -16,30 +16,30 @@ let to_string = function
| L -> "L" | L -> "L"
let of_string = function let of_string = function
| "S" -> S | "S" | "s" -> S
| "P" -> P | "P" | "p" -> P
| "D" -> D | "D" | "d" -> D
| "F" -> F | "F" | "f" -> F
| "G" -> G | "G" | "g" -> G
| "H" -> H | "H" | "h" -> H
| "I" -> I | "I" | "i" -> I
| "J" -> J | "J" | "j" -> J
| "K" -> K | "K" | "k" -> K
| "L" -> L | "L" | "l" -> L
| x -> raise (Failure ("Symmetry should be S|P|D|F|G|H|I|J|K|L, | x -> raise (Failure ("Symmetry should be S|P|D|F|G|H|I|J|K|L,
not "^x^".")) not "^x^"."))
let of_char = function let of_char = function
| 'S' -> S | 'S' | 's' -> S
| 'P' -> P | 'P' | 'p' -> P
| 'D' -> D | 'D' | 'd' -> D
| 'F' -> F | 'F' | 'f' -> F
| 'G' -> G | 'G' | 'g' -> G
| 'H' -> H | 'H' | 'h' -> H
| 'I' -> I | 'I' | 'i' -> I
| 'J' -> J | 'J' | 'j' -> J
| 'K' -> K | 'K' | 'k' -> K
| 'L' -> L | 'L' | 'l' -> L
| x -> raise (Failure ("Symmetry should be S|P|D|F|G|H|I|J|K|L")) | x -> raise (Failure ("Symmetry should be S|P|D|F|G|H|I|J|K|L"))
let to_l = function let to_l = function