Hmm... I have some minor comments. Perhaps resubmit? I await your instructions.
Use unless. ----------- > ensureDirectories :: WriteableDirectory m => FileName -> m () > ensureDirectories d = do > isPar <- mDoesDirectoryExist d > - if isPar > - then return () > - else ensureDirectories (super_name d) >> (mCreateDirectory d) > + unless isPar $ > + do ensureDirectories $ super_name d > + mCreateDirectory d I might be a little less enthusiastic care-free about making purely parenthesis and do-notation vs explicit type refactors (because we can flip-flop a bit about which is best for what situation, so it may be good just to avoid the churn). I don't mind the patch, but if you wish to reconsider it (or just have me apply, it let me know) Redundant do. ------------- > +syncSlurpy put s = if unsyncedSlurpySize s > slurp_sync_size > + then return <<= put s > + else return s return <<= put s could also have been simplified to put s Haddockize add_to_list. ----------------------- > +-- | Add a new element to a list, as long as that element is not > +-- already in the list. > add_to_list :: Eq a => a -> [a] -> [a] > add_to_list s [] = [s] > hunk ./src/Darcs/Repository/Prefs.lhs 384 > -add_to_list s (s':ss) = if s == s' then (s:ss) else s': add_to_list s ss > +add_to_list s (s':ss) | s == s' = s:ss > + | otherwise = s': add_to_list s ss False advertising, and also the kind of refactor I would have just avoided (churn without appreciable gain in clarity, i.e. one could have argued that the previous version (sans excess parens) would have been more readable... I don't know which is which, but the fact that it's not cut and dry probably means it's wisest to leave it alone) -- Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow> PGP Key ID: 08AC04F9
signature.asc
Description: Digital signature
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
