serv-0.2.0.0: Dependently typed API framework

Safe HaskellNone
LanguageHaskell2010

Serv.Api.Prelude

Description

Module containing everything you need to define an Api type. Import this unqualified for easy Api definitions.

Exports the instance of SingI for all Typeable types. This will cause issues for CustomStar-style SingI instances, but is nearly required for Serv.

Synopsis

Documentation

module Serv.Api

class SingI a where

A SingI constraint is essentially an implicitly-passed singleton. If you need to satisfy this constraint with an explicit singleton, please see withSingI.

Methods

sing :: Sing k a

Produce the singleton explicitly. You will likely need the ScopedTypeVariables extension to use this method the way you want.

Instances

SingI Status NetworkAuthenticationRequired 
SingI Status NotExtended 
SingI Status LoopDetected 
SingI Status InsufficientStorage 
SingI Status VariantAlsoNegotiates 
SingI Status HTTPVersionNotSupported 
SingI Status GatewayTimeout 
SingI Status ServiceUnavailable 
SingI Status BadGateway 
SingI Status NotImplemented 
SingI Status InternalServerError 
SingI Status UnavailableForLegalReasons 
SingI Status RequestHeaderFieldsTooLarge 
SingI Status TooManyRequests 
SingI Status PreconditionRequired 
SingI Status UpgradeRequired 
SingI Status FailedDependency 
SingI Status Locked 
SingI Status UnprocessableEntity 
SingI Status MisdirectedRequest 
SingI Status ExpectationFailed 
SingI Status RequestedRangeNotSatisfiable 
SingI Status UnsupportedMediaType 
SingI Status RequestURITooLong 
SingI Status PayloadTooLarge 
SingI Status PreconditionFailed 
SingI Status LengthRequired 
SingI Status Gone 
SingI Status Conflict 
SingI Status RequestTimeout 
SingI Status ProxyAuthenticationRequired 
SingI Status NotAcceptable 
SingI Status MethodNotAllowed 
SingI Status NotFound 
SingI Status Forbidden 
SingI Status PaymentRequired 
SingI Status Unauthorized 
SingI Status BadRequest 
SingI Status PermanentRedirect 
SingI Status TemporaryRedirect 
SingI Status NotModified 
SingI Status SeeOther 
SingI Status Found 
SingI Status MovedPermanently 
SingI Status MultipleChoices 
SingI Status IMUsed 
SingI Status PartialContent 
SingI Status ResetContent 
SingI Status NoContent 
SingI Status NonAuthoritiveInformation 
SingI Status Accepted 
SingI Status Created 
SingI Status Ok 
SingI Status SwitchingProtocols 
SingI Status Continue 
SingI Verb PUT 
SingI Verb POST 
SingI Verb PATCH 
SingI Verb OPTIONS 
SingI Verb HEAD 
SingI Verb GET 
SingI Verb DELETE 
SingI HeaderName WWWAuthenticate 
SingI HeaderName Vary 
SingI HeaderName TransferEncoding 
SingI HeaderName Trailer 
SingI HeaderName StrictTransportSecurity 
SingI HeaderName SetCookie 
SingI HeaderName RetryAfter 
SingI HeaderName PublicKeyPins 
SingI HeaderName ProxyAuthenticate 
SingI HeaderName Location 
SingI HeaderName Link 
SingI HeaderName LastModified 
SingI HeaderName Expires 
SingI HeaderName ETag 
SingI HeaderName ContentSecurityPolicy 
SingI HeaderName ContentRange 
SingI HeaderName ContentLocation 
SingI HeaderName ContentLanguage 
SingI HeaderName ContentEncoding 
SingI HeaderName ContentDisposition 
SingI HeaderName Allow 
SingI HeaderName Age 
SingI HeaderName AcceptRanges 
SingI HeaderName AcceptPatch 
SingI HeaderName AccessControlAllowHeaders 
SingI HeaderName AccessControlAllowMethods 
SingI HeaderName AccessControlAllowCredentials 
SingI HeaderName AccessControlMaxAge 
SingI HeaderName AccessControlExposeHeaders 
SingI HeaderName AccessControlAllowOrigin 
SingI HeaderName XCsrfToken 
SingI HeaderName XForwardedProto 
SingI HeaderName XForwardedHost 
SingI HeaderName XForwardedFor 
SingI HeaderName UserAgent 
SingI HeaderName TE 
SingI HeaderName Referer 
SingI HeaderName Range 
SingI HeaderName ProxyAuthorization 
SingI HeaderName Origin 
SingI HeaderName MaxForwards 
SingI HeaderName IfUnmodifiedSince 
SingI HeaderName IfRange 
SingI HeaderName IfNoneMatch 
SingI HeaderName IfModifiedSince 
SingI HeaderName IfMatch 
SingI HeaderName Host 
SingI HeaderName From 
SingI HeaderName Expect 
SingI HeaderName Cookie 
SingI HeaderName Authorization 
SingI HeaderName AccessControlRequestHeaders 
SingI HeaderName AccessControlRequestMethod 
SingI HeaderName AcceptLanguage 
SingI HeaderName AcceptEncoding 
SingI HeaderName AcceptCharset 
SingI HeaderName Accept 
SingI HeaderName Warning 
SingI HeaderName Via 
SingI HeaderName Upgrade 
SingI HeaderName Pragma 
SingI HeaderName Date 
SingI HeaderName ContentType 
SingI HeaderName ContentLength 
SingI HeaderName Connection 
SingI HeaderName CacheControl 
SingI Nat i => SingI Status (CustomStatus i) 
SingI Symbol s => SingI HeaderName (CustomHeader s) 
SingI (Api *) (Abstract *) 
SingI (Path *) (Wildcard *) 
SingI (Body *) (Empty *) 
SingI [Api *] ts => SingI (Api *) (OneOf * ts) 
SingI Symbol s => SingI (Path *) (Const * s) 
(SingI (Path *) p, SingI (Api *) k) => SingI (Api *) ((:>) * p k) 
(SingI * t, SingI [Handler *] ts) => SingI (Api *) (Endpoint * t ts) 
(SingI HeaderName n, SingI * t) => SingI (Path *) (Header * n t) 
(SingI Symbol n, SingI * t) => SingI (Path *) (Seg * n t) 
(SingI HeaderName n, SingI Symbol v) => SingI (Path *) (HeaderAs * n v) 
(SingI Verb v, SingI [(,) Status (Output *)] ts) => SingI (Handler *) (Method * v ts) 
(SingI [(,) HeaderName *] ts, SingI (Handler *) k) => SingI (Handler *) (CaptureHeaders * ts k) 
(SingI [(,) Symbol *] ts, SingI (Handler *) k) => SingI (Handler *) (CaptureQuery * ts k) 
(SingI [(,) HeaderName *] ts, SingI (Body *) b) => SingI (Output *) (Respond * ts b) 
(SingI [*] ts, SingI * a) => SingI (Body *) (HasBody * ts a) 
(SingI [*] ts, SingI * a, SingI (Handler *) k) => SingI (Handler *) (CaptureBody * ts a k)