http-kinder-0.2.0.0: Generic kinds and types for working with HTTP

Safe HaskellNone
LanguageHaskell2010

Network.HTTP.Kinder.Verb

Contents

Description

Defines types and kinds for working with type and value level HTTP verbs.

Synopsis

Functions and types for working with HeaderName Sings

verbName :: IsString t => Verb -> t Source

Convert a Verb to its string-like representation

parseVerb :: ByteString -> Maybe Verb Source

Attempt to parse a string-like representation of a Verb.

The Verb type/kind

data Verb Source

A data type representing HTTP verbs. Much more importantly, with DataKinds enabled this becomes a kind describing types, one for each such verb.

Use Verb at both the kind and type levels---it works equally well at both unlike, e.g., HeaderName. Use methods of SingKind to convert between Verb values and Verb Sings

Note: TRACE is intentionally omitted because (a) it's very low value and (b) it opens a potential security hole via Cross-Site-Tracing.

Constructors

DELETE 
GET 
HEAD 
OPTIONS 
PATCH 
POST 
PUT 

data family Sing a

The singleton kind-indexed data family.

Instances

data Sing Bool where 
data Sing Ordering where 
data Sing Nat where 
data Sing Symbol where 
data Sing () where 
data Sing HeaderName where 
data Sing Verb where 
data Sing Status where 
data Sing [a0] where 
data Sing (Maybe a0) where 
data Sing (TyFun k1 k2 -> *) = SLambda {} 
data Sing (Either a0 b0) where 
data Sing ((,) a0 b0) where 
data Sing ((,,) a0 b0 c0) where 
data Sing ((,,,) a0 b0 c0 d0) where 
data Sing ((,,,,) a0 b0 c0 d0 e0) where 
data Sing ((,,,,,) a0 b0 c0 d0 e0 f0) where 
data Sing ((,,,,,,) a0 b0 c0 d0 e0 f0 g0) where 

Type synonyms for more convenient use of HeaderNames

type GET = GET Source

type PUT = PUT Source