On Fri, Dec 26, 2008 at 02:54:29 -0800, Trent W. Buck wrote:
> Apart from "darcs: bug", everything on the two lines in the example
> below used to appear on a single line.  This patch avoids that.

I'll apply this, suppressing my usual urge towards conservatism (I am
slightly nervous about potentially losing some useful property about
having it all on one line, but let's try and see)

> PS: it really confused me that "bug" was used but not imported in
> ShowBug.  By chance I happened to look at impossible.h, and it looks
> like that provides "bug" as a macro.  Might it be better to move code
> from impossible.h into Autoconf.hs.in or something?  That is, have
> Bug.hs import Autoconf (fetchUrl), and export `bug`.

Maybe.  Getting the dependencies right for the bug code was quite
tricky, and I suspect we need the cpp magic to make the file and
line-number reporting work right

Improve readability of bug reporting.
-------------------------------------
> Trent W. Buck <[email protected]>**20081226104243
>  Moving "at <location>" to the first line gives the descriptive string
>  a line all to itself.  For example, darcs show bug:
>  
>      darcs: bug at src/Darcs/Commands/ShowBug.lhs:57 compiled Nov  4 2008 
> 12:05:43
>      This is actually a fake bug in darcs.
> ] hunk ./src/Darcs/Bug.hs 19
>  
>  _bugDoc :: FetchUrl -> BugStuff -> Doc -> a
>  _bugDoc fetchUrl bs s =
> - -    errorDoc $ text "bug in darcs!" $$ s <+> text ("at "++_bugLoc bs) $$
> +    errorDoc $ text ("bug at "++_bugLoc bs) $$ s $$
>      unsafePerformIO ((mkms . lines) `fmap` (fetchUrl 
> "http://darcs.net/maintenance";
>                                              `catch` \_ -> return ""))
>      where mkms [] = text "I'm unable to check http://darcs.net/maintenance 
> to see if this version is supported."
> 

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

Attachment: pgpP5oGIR8SIY.pgp
Description: PGP signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to