-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Also Neil, I'm wondering how Dr. Haskell handles under-use of library functions. For example, in the darcs codebase there's about 13 examples of this pattern/idiom: -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux)
iEYEAREKAAYFAklLxggACgkQvpDo5Pfl1oLFSQCeKB1APgoby30Gg0+GTinAhNzU Hm4AnR+HB1h0i7SqiiIS40nUKO6ZYE0s =Q8WT -----END PGP SIGNATURE----- > if foo then do stuff > moreStuff > lastOfTheStuff > else return () Which is less clear than using Control.Monad.when to write: > when foo $ do stuff > moreStuff > lastOfTheStuff (when packages up the 'if foo then bar else return ()' pattern.) This specific example didn't appear in the report, so obviously Dr. Haskell doesn't completely handle it. Would one have to add some heuristic "Warning: use of 'else return ()' should probably be replaced with 'when'"? -- gwern _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
