Package logo's

Max Bolingbroke batterseapower at
Sun Oct 23 00:58:12 CEST 2011

Hi Bas,

On 22 October 2011 21:15, Bas van Dijk <v.dijk.bas at> wrote:
> Attached is the package logo patch I was working on.

I wonder if perhaps you should implement this more like how Duncan
implemented change logs. i.e.:

 1. Add a rendLogo field to PackageRender
 2. Have doPackageRender fill rendLogo out by doing an IO-monad query
similar to getLogoHtml but which is of type e.g. IO (Maybe String),
where the String will be the URI of the logo
 3. Change packagePage to build HTML (i.e. img or object tag) from
this URI based on the extension

I think the advantage of this approach is that:
 a) You won't have to add the logo-finding code to both the package
page and the candidate-package page, since PackageRender is shared
code between them
 b) The rendLogo field of PackageRender could sensibly be consumed by
other users -- e.g. a feature producing JSON representing a package
 c) It is more uniform with how stuff like this is currently
implemented (I'm mainly thinking of changelogs here)



More information about the cabal-devel mailing list