[darcs-devel] [patch898] Style/Tidy Cache.hs (and 7 more)

Eric Kow bugs at darcs.net
Sat Aug 18 09:24:36 UTC 2012


Eric Kow <kowey at darcs.net> added the comment:

Stylistic nitpick:  I have some doubts about using Show as a catch-all 
“make this a String” function.  I get the impression that actually Show 
should try to produce a reasonable Haskell representation of your data.  
It could be that so few people respect this that it's not worth trying 
to do it (something about barn doors and horses?).  For my own stuff I'd 
taken to ripping out my human-friendly Show instances and replacing them 
with a Pretty typeclass.  I forget why exactly I care about this, I 
think partly that the Haskell-y-not-people-friendly Show stuff does get 
pretty convenient for debugging.

Show aside, I think we also want to be careful that we don't 
accidentally use show-for-humans functions outside the context of 
talking to users.  If it so happens that the human-friendly 
representation is the same as the real-effects representation, then we 
should define show in terms of the real-effects one (so show = hashedDir 
in this case)

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch898>
__________________________________


More information about the darcs-devel mailing list