Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add recipe introducing servant-pagination #946

Merged
merged 1 commit into from
Apr 17, 2018
Merged

add recipe introducing servant-pagination #946

merged 1 commit into from
Apr 17, 2018

Conversation

KtorZ
Copy link
Contributor

@KtorZ KtorZ commented Apr 16, 2018

As proposed in #125, here's a short introduction to servant-pagination.

Feedback is welcome :)

@alpmestan
Copy link
Contributor

@KtorZ Haven't yet looked at the explanations (I won't be too picky though, don't worry), but is there a reason why your patch comes with both a Main.hs and a Pagination.lhs, with the code duplicated in both?

See 5ac6de8 for an example of commit that adds a cookbook recipe with the code and explanations in a single file. The trick is to have:

  ghc-options:         -pgmL markdown-unlit
  build-tool-depends: markdown-unlit:markdown-unlit

in the .cabal file. This processes the file with markdown-unlit (which strips away all the markdown, only leaving the code) before giving its contents to GHC.

@KtorZ
Copy link
Contributor Author

KtorZ commented Apr 16, 2018

Ah! You're entirely right, I wrongly committed that. I'll update 👍

@KtorZ
Copy link
Contributor Author

KtorZ commented Apr 17, 2018

Done 👍
Let me know :)

Copy link
Contributor

@alpmestan alpmestan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you for taking the time to write it all down!

#### Parsing Options

By default, `servant-pagination` provides an implementation of `getRangeOptions` for each
`HasPagination` type-class. However, this can be overwritten when defining a instance of that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for each HasPagination instance, I suppose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed!

hide in shame

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 93838ae

@alpmestan alpmestan merged commit 6af3835 into haskell-servant:master Apr 17, 2018
@alpmestan
Copy link
Contributor

Thanks @KtorZ!

Your recipe should appear on https://haskell-servant.readthedocs.io/en/latest/cookbook/index.html (note the latest in the URL, which reflects the docs for the master branch, as opposed to stable which has the docs for the latest release) soon (15 mins IIRC? something along those lines).

@KtorZ
Copy link
Contributor Author

KtorZ commented Apr 17, 2018

Awesome! 🎉

@alpmestan
Copy link
Contributor

@ysangkok
Copy link
Contributor

@KtorZ the pagination library is missing a bunch of dependency bound updates, are you still maintaining this? I think it would be best if either the repo became part of this org, or that we removed it.

@KtorZ
Copy link
Contributor Author

KtorZ commented Nov 22, 2023

I am not directly since it's part of the Chordify organization which I am (unfortunately ❤️) no longer working with.
I don't know if they're still keen on maintaining it but perhaps @jbransen can chime in.

@jbransen
Copy link

@isomorpheme ^

@isomorpheme
Copy link
Contributor

Chiming in as one of the Chordify people with open source responsibility. :) If the dependency bounds can be fixed purely via a Hackage revision then @swamp-agr should be able to do that; if not I'd be happy to review a patch.

In general I expect we'll maintain it just to the degree that we need for internal use - we're open to PRs of course but I've noticed that reviewing those tends to drift down to the bottom of my todo list. So with that in mind I wouldn't mind at all to transfer the repo to this org (but removing the cookbook instead is also fine by me).

@ysangkok
Copy link
Contributor

ysangkok commented Nov 27, 2023

@ysangkok
Copy link
Contributor

ysangkok commented Dec 2, 2023

@isomorpheme Please review the linked patch, it seems like swamp-agr is not available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants