http-media-0.1.1: Processing HTTP Content-Type and Accept headers

Safe HaskellSafe-Inferred

Network.HTTP.Media.Match

Description

Defines the Match type class, designed to unify types on the matching functions in the Media module.

Synopsis

Documentation

class Match a whereSource

Defines methods for a type whose values can be matched against each other in terms of a HTTP media header.

This allows functions to work on both the standard Accept header and others such as Accept-Language that still may use quality values.

Methods

matches :: a -> a -> BoolSource

Evaluates whether either the left argument matches the right one (order may be important).

moreSpecificThan :: a -> a -> BoolSource

Evaluates whether the left argument is more specific than the right.

mostSpecific :: Match a => a -> a -> aSource

Evaluates to whichever argument is more specific. Left biased.