HDXZOIW5VQNW7CELIX24MSBSZEUBBUNYQGK55G6U6J4SFDGUECJAC let index = addLocation (Primer vol from to) loc primersin saveIndex index
let newPrimer = Primer vol from toindex = case getPrimer vol primers ofNothing -> Right $ addLocation newPrimer loc primersJust x ->if x == newPrimerthen Right $ addLocation newPrimer loc primerselse Left "The primer already exists and they differ in some fields"in liftEither index >>= saveIndex