Comments (6)
Okay. I think I might actually just make the argument a string and reuse readQ
. I won't have time to get on top of this for at least two weeks but it should be a pretty simple addition.
from http-media.
Are you ever building quality values that don't have a quality of 1?
from http-media.
Re building non-1 quality values: I think it's possible. My current use-case can afford to be a toy, but I could easily see someone building a server that fills in a default accept header along the lines of text/html,*/*;q=0.9
.
from http-media.
Okay, I've pushed to develop. I've exposed the maxQuality
and minQuality
functions, as well as a new quality
function that uses readQ
with a default error message. I've also prepped to bump the version to 1.0, let me know what you think and I'll finalise the release and publish to Hackage.
from http-media.
Totally forgot about this. Let me know if you have any thoughts, I'll push the release soon.
from http-media.
Well, you're not alone in forgetting :)
I think this kills the issue. I was going back-and-forth on whether an IsString
instance would be good, but IsString a => IsString (Quality a)
seems way too general to be a good idea.
I did have an unrelated idea before you publish, which I've put in #21 for organization purposes.
from http-media.
Related Issues (20)
- Fails to build with GHC 7.10.1 – ambiguous type variables HOT 2
- Structured Syntax Suffix support? HOT 2
- one test failed with stackage nightly ghc-7.10.2 HOT 1
- Parse error on empty param HOT 2
- Exception building wildcard media types with `(//)` HOT 1
- Missing Haddock in hackage. HOT 1
- Simultaneous match and map accept HOT 5
- compile error with http-media-0.7 and base-4.6 HOT 2
- Please include Changelog. HOT 4
- Allow deconstructing Quality values HOT 4
- Property Test Failure HOT 1
- Problem with `Accept` Parsing HOT 2
- q=0 can be overridden by a less specific match HOT 1
- Derive Generic for MediaType HOT 1
- Release master? HOT 2
- `matchAccept` doesn't properly process `*/*` (media-range with asterisks/stars/wildcards) when the `Accept` instance is `ByteString` HOT 2
- hackage release doesn't allow ghc-9.2 and newer libs HOT 3
- Inconsistent content matching in the presence of parameters HOT 1
- Support GHC-9.6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from http-media.