> It occured to me that we have atomicModifyWithLens in
> Ganeti.Utils.IORef which might be useful here to simplify the
> `memstate` modifications.
> 
> In either case, LGTM

Indeed, that would work. I didn't realize I could use makeCustomLenses
in the same file I define the data type without a TemplateHaskell phase
violation. In this case, I'd like to add this change; as it, however,
also affects functions previously present in this file, I suggest extending
this patch series by two patches

  Add version of atomicModifyWithLens discarding the result
  Simplify modifications using modifyWithLens_

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores

Reply via email to