-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
Jkarni/content types #9
Conversation
Still needs QQ.
And general cleanup.
d702479
to
9785783
Compare
9785783
to
21667cc
Compare
I'm happy to merge this without QQ so all the downstream packages will start building against master, and then have the QQ as a separate PR. @alpmestan @tvh @christian-marie review? |
Where should the instances for I also don't like upper bounds where they just guess if it will still work or not. With Stackage we have a powerful tool to catch those broken builds. Apart from this I like how it looks. |
I agree to all of these points ^^ I think servant-instances would be not so nice, I'd prefer just sticking them in servant. As for XML, if it's not got instances it should be added to a servant-xml package with instances. Vice versa probably for anything that isn't JSON. Ideally, I'd like to ship "batteries included". |
handleAcceptH _ (AcceptHeader accept) val = M.mapAcceptMedia lkup accept | ||
where pctyps = Proxy :: Proxy ctyps | ||
amrs = amr pctyps val | ||
lkup = zip (map fst amrs) $ map (\(a,b) -> (cs $ show a, b)) amrs |
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.
This is bending my mind a little, so this may not be 100% correct, but isn't this equivalent to:
fmap (\(a,b) -> (a, (cs $ show a, b)) amrs
Again, I didn't check the types. I may be wrong here.
I've opened a pull request on servant-docs which updates it in line with the changes here. |
There is one for servant-jquery as well. |
7e50d5f
to
e109f94
Compare
e109f94
to
5e4297a
Compare
0e895cb
to
0453cc3
Compare
2714f34
to
08528dc
Compare
Great work guys, this looks good to merge! Let the content-type-driven goodness spread =) |
Thanks a lot everyone for the reviews and ideas! |
Add DocIntro and DocNote types to allow extra docs
Use 'master' servant and servant-server for travis.
Code changes to support Jkarni/content types.
Do not merge yet - QQ needs to fixed.