HDXZOIW5VQNW7CELIX24MSBSZEUBBUNYQGK55G6U6J4SFDGUECJAC
let index = addLocation (Primer vol from to) loc primers
in saveIndex index
let newPrimer = Primer vol from to
index = case getPrimer vol primers of
Nothing -> Right $ addLocation newPrimer loc primers
Just x ->
if x == newPrimer
then Right $ addLocation newPrimer loc primers
else Left "The primer already exists and they differ in some fields"
in liftEither index >>= saveIndex