
On Tue, Dec 21, 2010 at 3:37 PM, Alexander Dunlap
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.