[web-devel] ANN: yesod-paginate
Felipe Almeida Lessa
felipe.lessa at gmail.com
Tue Dec 21 18:46:13 CET 2010
On Tue, Dec 21, 2010 at 3:37 PM, Alexander Dunlap
<alexander.dunlap at gmail.com> wrote:
> I have just released yesod-paginate, 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.
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.
More information about the web-devel