-
Notifications
You must be signed in to change notification settings - Fork 292
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
Support http-api-data #490
Conversation
Thanks! It just needs a few changes for older versions of GHC |
@gregwebs you have ideas about GHC 7.6 builds? I am not sure what happens there. |
7.6 was already failing, so don't worry about that. I think cabal is just failing to find an install plan for 7.6 now. |
Maybe you should place GHC 7.6 builds under |
good call. trying that in #491 |
Is this PR good for merge? |
yeah, I will merge and release it after fixing the Travis build. Thanks a lot! |
@gregwebs I started to forget about bounds after I've switched to |
I pushed your branch with a merge to master, will merge the branch after that passes: https://travis-ci.org/yesodweb/persistent/builds/84593423 |
import Web.PathPieces (PathPiece (..)) | ||
import Web.PathPieces (PathPiece(..)) | ||
import Web.HttpApiData (ToHttpApiData(..), FromHttpApiData(..)) | ||
import Web.HttpApiData.Internal (parseUrlPieceWithPrefix, readEitherTextData, parseUrlPieceMaybe) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this module be Internal
if it is used by all the persistent libraries? Internal generally means something that should be avoided if possible and not depended upon by a library. A more usual name would be Utils
, but I don't like generic names like that and tend to look for something more like Web.HttpApiData.Parse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing this up! For the first version of http-api-data
this was intentional, since I didn't know which helpers I should export and by what name (I do not particularly like current naming).
I have opened fizruk/http-api-data#18 to discuss this.
I have updated |
great! I will
|
@gregwebs can I do anything to speed this up? |
Nope. I created #494 for this |
@gregwebs Great, thanks! |
This adds
ToHttpApiData
andFromHttpApiData
instances and replacesPathPieces
instance bodies withtoUrlPiece
andparseUrlPieceMaybe
.From user's POV this changes instance for
CheckMark
to encode in lower-case and parse case-insensitively.