[web-devel] ANN: yesod-paginate

Alexander Dunlap alexander.dunlap at gmail.com
Wed Dec 22 18:44:22 CET 2010

On Tue, Dec 21, 2010 at 9:46 AM, Felipe Almeida Lessa
<felipe.lessa at gmail.com> wrote:
> On Tue, Dec 21, 2010 at 3:37 PM, Alexander Dunlap
> <alexander.dunlap at gmail.com> wrote:
>> I have just released yesod-paginate[1], a simple Yesod-based subsite
>> library that simplifies somewhat the process of paginating long series
>> of items. The library does not deal with formatting (that is provided
>> by the user as a subsite argument); it merely sets up some URLs that
>> allow users to view items a few at a time. It also provides prevLink
>> and nextLink functions that provide the routes to the next and
>> previous page of items.
> Great!
> I think it would be nice to be able to choose other representations
> besides RepHtml.  For example, the same URL could be used for JSON.
> So, instead of
>  getPaginateR :: Int -> Int -> GHandler (Paginate master a) master RepHtml
> it could be
>  getPaginateR :: Int -> Int -> GHandler (Paginate master rep a) master rep
> Only the types change, the implementation remains the same =) and we
> don't lose any static checking.
> Cheers!
> --
> Felipe.

Thanks for the suggestion - I've released version 0.1 which includes
that change.

Alexander Dunlap

More information about the web-devel mailing list