> Thu Jul 26 17:13:58 PDT 2007  David Roundy <[EMAIL PROTECTED]>
>   * move to pure record-access in Patch.Info.

Looks good, although some suggestions below.

>  just_name :: PatchInfo -> String
> -just_name (PatchInfo _ n _ _ False) = unpackPS n
> -just_name (PatchInfo _ n _ _ True) = "UNDO: " ++ unpackPS n
> +just_name pinf = if is_inverted pinf then "UNDO: " ++ unpackPS (_pi_name 
> pinf)
> +                                     else unpackPS (_pi_name pinf)

We can probably just use pi_name here

> +    <+> text "author='" <> escapeXML (just_author pi) <> text "'"

We probably want this to be pi_author, even thogh they do the same
thing.

> +    fix_up_fname (midtrunc (pi_name pi)++"-"++just_author pi++"-"++unpackPS 
> (_pi_date pi))

Likewise here.

> +               ((td ! [align "right"] << mail_link (just_author pi)) `beside`
> +                (td << (friendly_d $ _pi_date pi)))

And here.

I'm not entirely sure, but my feeling is that the pi_ functions leave
the string a state as possible, where as the just_ functions allow for
some fiddling, specifically the 'UNDO' which just_name adds.  We might
look into renaming some of these functions to make it clear.

Note that I had added pi_name for amend-record, and threw in pi_author
for consistency. Maybe that was unwise...

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.

Attachment: pgpgRtAoBsW0v.pgp
Description: PGP signature

_______________________________________________
darcs-devel mailing list
darcs-devel@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to