On Mon, Dec 22, 2008 at 10:04:33 -0800, [email protected] wrote:
> Mon Dec 22 13:02:27 EST 2008  [email protected]
>   * Darcs.ColorPrinter: factor out getPolicy call
>   Less redundancy. 'getPolicy' is being called with the same args, and it's
>   not like the environmental variables are going to change in between each
>   call.

Applied, thanks!

In the future, no trailing whitespace, please
http://wiki.darcs.net/index.html/CodingStyle

(I don't fully understand why it bugs me yet)

Darcs.ColorPrinter: factor out getPolicy call
---------------------------------------------
> [email protected]**20081222180227
>  Ignore-this: aee5b5415ee8bbfe1dac06e240b90080
>  Less redundancy. 'getPolicy' is being called with the same args, and it's
>  not like the environmental variables are going to change in between each
>  call.
> ] hunk ./src/Darcs/ColorPrinter.hs 104
>  -- | @'fancyPrinters' h@ returns a set of printers suitable for outputting
>  -- to @h@
>  fancyPrinters :: Printers
> - -fancyPrinters h = Printers { colorP     = colorPrinter (getPolicy h),
> +fancyPrinters h = let policy = getPolicy h in 
> +                      Printers { colorP = colorPrinter policy,
                               invisibleP = invisiblePrinter,
> hunk ./src/Darcs/ColorPrinter.hs 107
> - -                             hiddenP = colorPrinter (getPolicy h) Green,
> - -                             userchunkP  = userchunkPrinter (getPolicy h),
> - -                             defP       = escapePrinter (getPolicy h),
> - -                             lineColorT = lineColorTrans (getPolicy h),
> - -                             lineColorS = lineColorSuffix (getPolicy h)
> +                             hiddenP = colorPrinter policy Green,
> +                             userchunkP = userchunkPrinter policy,
> +                             defP       = escapePrinter policy,
> +                             lineColorT = lineColorTrans policy,
> +                             lineColorS = lineColorSuffix policy

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

Attachment: signature.asc
Description: Digital signature

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

Reply via email to