> +-- * Utility functions > + > +-- | Atomically modifies an 'IORef' using a lens > +atomicModifyWithLens :: (MonadBase IO m) > + => IORef a -> Lens a a b c -> (b -> (r, c)) -> m r > +atomicModifyWithLens ref l f = atomicModifyIORef ref (swap . traverseOf l f) > +
Actually, this function has a generic type, completly unrelated to WConfD. So you might consider moving it to one of our generic Util modules. However, this is your call. The LGTM remains, and LGTM if you follow this suggestion. -- 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
