[darcs-users] darcs patch: Made --summary --xml-output work for other commands th...

Reinier Lamers tux_rocker at reinier.de
Sun Mar 29 12:34:04 UTC 2009


Hi,

On Sunday 29 March 2009 00:28:05 Florian Gilcher wrote:
> >> +insert_before_lastline :: Doc -> Doc -> Doc
> >> +insert_before_lastline a b =
> >> +    case reverse $ map packedString $ linesPS $ renderPS a of
> >> +    (ll:ls) -> vcat (reverse ls) $$ b $$ ll
> >> +    [] -> impossible
> >
> > Shouldn't we move this to src/Printer.lhs? That's where the commonly
> > used
> > functions on Doc's reside.
>
> I just tried that to improve that. Turns out that "impossible" is
> undefined in
> Printer.lhs (happens), but you cannot include "impossible.h" into
> Printer,
> because that would create a circular dependency with Darcs.Bug. I have
> no quick
> idea how to solve this or whether darcs has an alternative way of
> reporting bugs.

I'd say that it is OK to just provide an error message with a bit of context 
yourself. Like 'error "empty Doc given as first argument of 
Printer.insert_before_last_line"'.

Regards,
Reinier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090329/5402cd9c/attachment.pgp>


More information about the darcs-users mailing list