Spock-core
Safe HaskellNone
LanguageHaskell2010

Web.Spock.Core

Synopsis

Lauching Spock

runSpock :: Port -> IO Middleware -> IO () Source #

Run a Spock application using run from Network.Wai.Handler.Warp.

runSpockNoBanner :: Port -> IO Middleware -> IO () Source #

Like runSpock, but does not display the banner "Spock is running on port XXX" on stdout.

spockAsApp :: IO Middleware -> IO Application Source #

Convert a middleware to an application. All failing requests will result in a 404 page

Spock's route definition monad

spockT :: MonadIO m => (forall a. m a -> IO a) -> SpockT m () -> IO Middleware Source #

Create a raw spock application with custom underlying monad Use runSpock to run the app or spockAsApp to create a Wai.Application The first argument is request size limit in bytes. Set to Nothing to disable.

spockConfigT :: MonadIO m => SpockConfig -> (forall a. m a -> IO a) -> SpockT m () -> IO Middleware Source #

Like spockT, but with additional configuration for request size and error handlers passed as first parameter.

type SpockT = SpockCtxT () Source #

Register routes with empty context. m is the base monad used by both registration and request actions; the final result is normally (). Pass a runner for m to spockT to build the middleware.

data SpockCtxT ctx (m :: Type -> Type) a Source #

Register routes whose handlers use ActionCtxT ctx m. Registration runs when the application is built, while the registered handlers and prehooks run for matching requests. ctx is supplied by prehook, m provides base effects, and a is the registration result. lift enters m at setup time.

Instances

Instances details
RouteM SpockCtxT Source # 
Instance details

Defined in Web.Spock.Core

Methods

addMiddleware :: forall (m :: Type -> Type) ctx. Monad m => Middleware -> SpockCtxT ctx m () Source

withPrehook :: forall (m :: Type -> Type) ctx ctx'. MonadIO m => ActionCtxT ctx m ctx' -> SpockCtxT ctx' m () -> SpockCtxT ctx m () Source

wireAny :: forall (m :: Type -> Type) ctx. Monad m => SpockMethod -> ([Text] -> ActionCtxT ctx m ()) -> SpockCtxT ctx m () Source

wireRoute :: forall (m :: Type -> Type) (xs :: [Type]) (ps :: PathState) ctx. (Monad m, HasRep xs) => SpockMethod -> Path xs ps -> HVectElim xs (ActionCtxT ctx m ()) -> SpockCtxT ctx m () Source

MonadTrans (SpockCtxT ctx) Source # 
Instance details

Defined in Web.Spock.Core

Methods

lift :: Monad m => m a -> SpockCtxT ctx m a

Monad m => Applicative (SpockCtxT ctx m) Source # 
Instance details

Defined in Web.Spock.Core

Methods

pure :: a -> SpockCtxT ctx m a

(<*>) :: SpockCtxT ctx m (a -> b) -> SpockCtxT ctx m a -> SpockCtxT ctx m b

liftA2 :: (a -> b -> c) -> SpockCtxT ctx m a -> SpockCtxT ctx m b -> SpockCtxT ctx m c

(*>) :: SpockCtxT ctx m a -> SpockCtxT ctx m b -> SpockCtxT ctx m b

(<*) :: SpockCtxT ctx m a -> SpockCtxT ctx m b -> SpockCtxT ctx m a

Functor m => Functor (SpockCtxT ctx m) Source # 
Instance details

Defined in Web.Spock.Core

Methods

fmap :: (a -> b) -> SpockCtxT ctx m a -> SpockCtxT ctx m b

(<$) :: a -> SpockCtxT ctx m b -> SpockCtxT ctx m a

Monad m => Monad (SpockCtxT ctx m) Source # 
Instance details

Defined in Web.Spock.Core

Methods

(>>=) :: SpockCtxT ctx m a -> (a -> SpockCtxT ctx m b) -> SpockCtxT ctx m b

(>>) :: SpockCtxT ctx m a -> SpockCtxT ctx m b -> SpockCtxT ctx m b

return :: a -> SpockCtxT ctx m a

MonadIO m => MonadIO (SpockCtxT ctx m) Source # 
Instance details

Defined in Web.Spock.Core

Methods

liftIO :: IO a -> SpockCtxT ctx m a

Defining routes

data Path (as :: [Type]) (pathState :: PathState) #

Instances

Instances details
(a ~ ('[] :: [Type]), pathState ~ 'Open) => IsString (Path a pathState)  
Instance details

Defined in Web.Routing.Combinators

Methods

fromString :: String -> Path a pathState

root :: Path ('[] :: [Type]) 'Open #

The root of a path piece. Use to define a handler for "/"

type Var a = Path '[a] 'Open #

data AltVar a b #

A variant of Either with a FromHttpApiData definition that tries both branches without a prefix. Useful to define routes with vars that should work with different types.

Constructors

AvLeft a 
AvRight b 

Instances

Instances details
(Eq a, Eq b) => Eq (AltVar a b)  
Instance details

Defined in Web.Routing.Combinators

Methods

(==) :: AltVar a b -> AltVar a b -> Bool

(/=) :: AltVar a b -> AltVar a b -> Bool

(Ord a, Ord b) => Ord (AltVar a b)  
Instance details

Defined in Web.Routing.Combinators

Methods

compare :: AltVar a b -> AltVar a b -> Ordering

(<) :: AltVar a b -> AltVar a b -> Bool

(<=) :: AltVar a b -> AltVar a b -> Bool

(>) :: AltVar a b -> AltVar a b -> Bool

(>=) :: AltVar a b -> AltVar a b -> Bool

max :: AltVar a b -> AltVar a b -> AltVar a b

min :: AltVar a b -> AltVar a b -> AltVar a b

(Read a, Read b) => Read (AltVar a b)  
Instance details

Defined in Web.Routing.Combinators

Methods

readsPrec :: Int -> ReadS (AltVar a b)

readList :: ReadS [AltVar a b]

readPrec :: ReadPrec (AltVar a b)

readListPrec :: ReadPrec [AltVar a b]

(Show a, Show b) => Show (AltVar a b)  
Instance details

Defined in Web.Routing.Combinators

Methods

showsPrec :: Int -> AltVar a b -> ShowS

show :: AltVar a b -> String

showList :: [AltVar a b] -> ShowS

(FromHttpApiData a, FromHttpApiData b) => FromHttpApiData (AltVar a b)  
Instance details

Defined in Web.Routing.Combinators

Methods

parseUrlPiece :: Text -> Either Text (AltVar a b)

parseHeader :: ByteString -> Either Text (AltVar a b)

parseQueryParam :: Text -> Either Text (AltVar a b)

var :: (Typeable a, FromHttpApiData a) => Path '[a] 'Open #

A route parameter

static :: String -> Path ('[] :: [Type]) 'Open #

A static route piece. One leading slash is optional. Empty internal and trailing pieces are retained for strict routing; compatibility routing and renderRoute ignore them. Use renderRouteWith with the application's policy.

trailingSlash :: forall (as :: [Type]). Path as 'Open -> Path as 'Open #

Require a trailing slash in strict routing, including after a capture. Root remains root, and a path already ending in a slash is unchanged.

(<//>) :: forall (as :: [Type]) (bs :: [Type]) (ps :: PathState). Path as 'Open -> Path bs ps -> Path (Append as bs) ps Source #

Combine two path components

(<.>) :: forall (as :: [Type]) (bs :: [Type]). Path as 'Open -> Path bs 'Open -> Path (Append as bs) 'Open infixl 8 #

Join the last segment on the left and the first on the right with a dot. Both sides may contain typed captures: var . "txt" or var . var. Matching tries the rightmost dot first and accepts the first split whose typed parsers and literals succeed. Use a custom capture type to restrict extensions; a Text capture accepts any text, including an empty extension. Static routes take precedence over extensions, then plain captures and wildcards. More literal characters give an extension pattern priority.

wildcard :: Path '[Text] 'Closed #

Matches the rest of the route. Should be the last part of the path.

Rendering routes

renderRoute :: forall (as :: [Type]). AllHave ToHttpApiData as => Path as 'Open -> HVectElim as Text Source #

Render a route applying path pieces

renderRouteWith :: forall (as :: [Type]). AllHave ToHttpApiData as => SlashPolicy -> Path as 'Open -> HVectElim as Text Source #

Render with the application's slash policy. Use StrictSlashes or RedirectTrailingSlashes to preserve trailing and repeated literal slashes.

renderRouteEncoded :: forall (as :: [Type]). AllHave ToHttpApiData as => Path as 'Open -> HVectElim as Text Source #

Render a URL with each complete path segment percent-encoded.

renderRouteEncodedWith :: forall (as :: [Type]). AllHave ToHttpApiData as => SlashPolicy -> Path as 'Open -> HVectElim as Text Source #

Percent-encoded rendering with the application's slash policy.

Hooking routes

prehook :: forall t (m :: Type -> Type) ctx ctx'. (RouteM t, MonadIO m) => ActionCtxT ctx m ctx' -> t ctx' m () -> t ctx m () Source #

Specify an action that will be run before all subroutes. It can modify the requests current context

get :: forall (xs :: [Type]) t (m :: Type -> Type) (ps :: PathState) ctx. (HasRep xs, RouteM t, Monad m) => Path xs ps -> HVectElim xs (ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when the HTTP verb GET and the given route match

post :: forall (xs :: [Type]) t (m :: Type -> Type) (ps :: PathState) ctx. (HasRep xs, RouteM t, Monad m) => Path xs ps -> HVectElim xs (ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when the HTTP verb POST and the given route match

getpost :: forall (xs :: [Type]) t (m :: Type -> Type) ctx (ps :: PathState). (HasRep xs, RouteM t, Monad m, Monad (t ctx m)) => Path xs ps -> HVectElim xs (ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when the HTTP verb GET/POST and the given route match

head :: forall (xs :: [Type]) t (m :: Type -> Type) (ps :: PathState) ctx. (HasRep xs, RouteM t, Monad m) => Path xs ps -> HVectElim xs (ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when the HTTP verb HEAD and the given route match

put :: forall (xs :: [Type]) t (m :: Type -> Type) (ps :: PathState) ctx. (HasRep xs, RouteM t, Monad m) => Path xs ps -> HVectElim xs (ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when the HTTP verb PUT and the given route match

delete :: forall (xs :: [Type]) t (m :: Type -> Type) (ps :: PathState) ctx. (HasRep xs, RouteM t, Monad m) => Path xs ps -> HVectElim xs (ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when the HTTP verb DELETE and the given route match

patch :: forall (xs :: [Type]) t (m :: Type -> Type) (ps :: PathState) ctx. (HasRep xs, RouteM t, Monad m) => Path xs ps -> HVectElim xs (ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when the HTTP verb PATCH and the given route match

hookRoute :: forall (xs :: [Type]) t (m :: Type -> Type) (ps :: PathState) ctx. (HasRep xs, RouteM t, Monad m) => StdMethod -> Path xs ps -> HVectElim xs (ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when a standard HTTP verb and the given route match

hookRouteCustom :: forall (xs :: [Type]) t (m :: Type -> Type) (ps :: PathState) ctx. (HasRep xs, RouteM t, Monad m) => Text -> Path xs ps -> HVectElim xs (ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when a custom HTTP verb and the given route match

hookAny :: forall t (m :: Type -> Type) ctx. (RouteM t, Monad m) => StdMethod -> ([Text] -> ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when a standard HTTP verb matches but no defined route matches. The full path is passed as an argument

hookAnyCustom :: forall t (m :: Type -> Type) ctx. (RouteM t, Monad m) => Text -> ([Text] -> ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when a custom HTTP verb matches but no defined route matches. The full path is passed as an argument

hookRouteAll :: forall (xs :: [Type]) t (m :: Type -> Type) (ps :: PathState) ctx. (HasRep xs, RouteM t, Monad m) => Path xs ps -> HVectElim xs (ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run regardless of the HTTP verb

hookAnyAll :: forall t (m :: Type -> Type) ctx. (RouteM t, Monad m) => ([Text] -> ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run regardless of the HTTP verb and no defined route matches. The full path is passed as an argument

data StdMethod #

HTTP standard method (as defined by RFC 2616, and PATCH which is defined by RFC 5789).

Since: http-types-0.2.0

Constructors

GET 
POST 
HEAD 
PUT 
DELETE 
TRACE 
CONNECT 
OPTIONS 
PATCH

Since: http-types-0.8.0

Instances

Instances details
Eq StdMethod  
Instance details

Defined in Network.HTTP.Types.Method

Methods

(==) :: StdMethod -> StdMethod -> Bool

(/=) :: StdMethod -> StdMethod -> Bool

Ord StdMethod  
Instance details

Defined in Network.HTTP.Types.Method

Methods

compare :: StdMethod -> StdMethod -> Ordering

(<) :: StdMethod -> StdMethod -> Bool

(<=) :: StdMethod -> StdMethod -> Bool

(>) :: StdMethod -> StdMethod -> Bool

(>=) :: StdMethod -> StdMethod -> Bool

max :: StdMethod -> StdMethod -> StdMethod

min :: StdMethod -> StdMethod -> StdMethod

Data StdMethod

Since: http-types-0.12.4

Instance details

Defined in Network.HTTP.Types.Method

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StdMethod -> c StdMethod

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StdMethod

toConstr :: StdMethod -> Constr

dataTypeOf :: StdMethod -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StdMethod)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StdMethod)

gmapT :: (forall b. Data b => b -> b) -> StdMethod -> StdMethod

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StdMethod -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StdMethod -> r

gmapQ :: (forall d. Data d => d -> u) -> StdMethod -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> StdMethod -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod

Bounded StdMethod  
Instance details

Defined in Network.HTTP.Types.Method

Methods

minBound :: StdMethod

maxBound :: StdMethod

Enum StdMethod  
Instance details

Defined in Network.HTTP.Types.Method

Methods

succ :: StdMethod -> StdMethod

pred :: StdMethod -> StdMethod

toEnum :: Int -> StdMethod

fromEnum :: StdMethod -> Int

enumFrom :: StdMethod -> [StdMethod]

enumFromThen :: StdMethod -> StdMethod -> [StdMethod]

enumFromTo :: StdMethod -> StdMethod -> [StdMethod]

enumFromThenTo :: StdMethod -> StdMethod -> StdMethod -> [StdMethod]

Generic StdMethod  
Instance details

Defined in Network.HTTP.Types.Method

Associated Types

type Rep StdMethod

Since: http-types-0.12.4

Instance details

Defined in Network.HTTP.Types.Method

type Rep StdMethod = D1 ('MetaData "StdMethod" "Network.HTTP.Types.Method" "http-typs-0.12.6-c4f7c903" 'False) (((C1 ('MetaCons "GET" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "POST" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "HEAD" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PUT" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TRACE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CONNECT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OPTIONS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PATCH" 'PrefixI 'False) (U1 :: Type -> Type)))))

Methods

from :: StdMethod -> Rep StdMethod x

to :: Rep StdMethod x -> StdMethod

Ix StdMethod  
Instance details

Defined in Network.HTTP.Types.Method

Methods

range :: (StdMethod, StdMethod) -> [StdMethod]

index :: (StdMethod, StdMethod) -> StdMethod -> Int

unsafeIndex :: (StdMethod, StdMethod) -> StdMethod -> Int

inRange :: (StdMethod, StdMethod) -> StdMethod -> Bool

rangeSize :: (StdMethod, StdMethod) -> Int

unsafeRangeSize :: (StdMethod, StdMethod) -> Int

Read StdMethod  
Instance details

Defined in Network.HTTP.Types.Method

Methods

readsPrec :: Int -> ReadS StdMethod

readList :: ReadS [StdMethod]

readPrec :: ReadPrec StdMethod

readListPrec :: ReadPrec [StdMethod]

Show StdMethod  
Instance details

Defined in Network.HTTP.Types.Method

Methods

showsPrec :: Int -> StdMethod -> ShowS

show :: StdMethod -> String

showList :: [StdMethod] -> ShowS

type Rep StdMethod #

Since: http-types-0.12.4

Instance details

Defined in Network.HTTP.Types.Method

type Rep StdMethod = D1 ('MetaData "StdMethod" "Network.HTTP.Types.Method" "http-typs-0.12.6-c4f7c903" 'False) (((C1 ('MetaCons "GET" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "POST" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "HEAD" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PUT" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TRACE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CONNECT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OPTIONS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PATCH" 'PrefixI 'False) (U1 :: Type -> Type)))))

Adding Wai.Middleware

middleware :: forall t (m :: Type -> Type) ctx. (RouteM t, Monad m) => Middleware -> t ctx m () Source #

Hook wai middleware into Spock

Actions

Config

data SpockConfig Source #

Constructors

SpockConfig 

Fields

data SlashPolicy #

How empty path segments are treated. The compatibility default ignores every empty segment. Strict policies preserve internal and trailing slashes. Redirects are performed by the HTTP adapter, using strict registry matching.

Instances

Instances details
Eq SlashPolicy  
Instance details

Defined in Web.Routing.SafeRouting

Methods

(==) :: SlashPolicy -> SlashPolicy -> Bool

(/=) :: SlashPolicy -> SlashPolicy -> Bool

Read SlashPolicy  
Instance details

Defined in Web.Routing.SafeRouting

Methods

readsPrec :: Int -> ReadS SlashPolicy

readList :: ReadS [SlashPolicy]

readPrec :: ReadPrec SlashPolicy

readListPrec :: ReadPrec [SlashPolicy]

Show SlashPolicy  
Instance details

Defined in Web.Routing.SafeRouting

Methods

showsPrec :: Int -> SlashPolicy -> ShowS

show :: SlashPolicy -> String

showList :: [SlashPolicy] -> ShowS

defaultSpockConfig :: SpockConfig Source #

Default Spock configuration. No restriction on maximum request size; error handler simply prints status message as plain text and all errors are logged to stderr.

Internals

hookRoute' :: forall (xs :: [Type]) t (m :: Type -> Type) (ps :: PathState) ctx. (HasRep xs, RouteM t, Monad m) => SpockMethod -> Path xs ps -> HVectElim xs (ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when a HTTP verb and the given route match

hookAny' :: forall t (m :: Type -> Type) ctx. (RouteM t, Monad m) => SpockMethod -> ([Text] -> ActionCtxT ctx m ()) -> t ctx m () Source #

Specify an action that will be run when a HTTP verb matches but no defined route matches. The full path is passed as an argument

data SpockMethod Source #

The SpockMethod allows safe use of http verbs via the MethodStandard constructor and StdMethod, and custom verbs via the MethodCustom constructor.

Constructors

MethodStandard !HttpMethod

Standard HTTP Verbs from StdMethod

MethodCustom !Text

Custom HTTP verbs represented as Text.

MethodAny

Match any HTTP verb

Instances

Instances details
Eq SpockMethod Source # 
Instance details

Defined in Web.Spock.Internal.Wire

Methods

(==) :: SpockMethod -> SpockMethod -> Bool

(/=) :: SpockMethod -> SpockMethod -> Bool

Generic SpockMethod Source # 
Instance details

Defined in Web.Spock.Internal.Wire

Associated Types

type Rep SpockMethod 
Instance details

Defined in Web.Spock.Internal.Wire

type Rep SpockMethod = D1 ('MetaData "SpockMethod" "Web.Spock.Internal.Wire" "Spock-core-0.16.1.0-inplace" 'False) (C1 ('MetaCons "MethodStandard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HttpMethod)) :+: (C1 ('MetaCons "MethodCustom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "MethodAny" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: SpockMethod -> Rep SpockMethod x

to :: Rep SpockMethod x -> SpockMethod

Hashable SpockMethod Source # 
Instance details

Defined in Web.Spock.Internal.Wire

Methods

hashWithSalt :: Int -> SpockMethod -> Int

hash :: SpockMethod -> Int

type Rep SpockMethod Source # 
Instance details

Defined in Web.Spock.Internal.Wire

type Rep SpockMethod = D1 ('MetaData "SpockMethod" "Web.Spock.Internal.Wire" "Spock-core-0.16.1.0-inplace" 'False) (C1 ('MetaCons "MethodStandard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HttpMethod)) :+: (C1 ('MetaCons "MethodCustom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "MethodAny" 'PrefixI 'False) (U1 :: Type -> Type)))

newtype HttpMethod Source #

Constructors

HttpMethod 

Instances

Instances details
Eq HttpMethod Source # 
Instance details

Defined in Web.Spock.Internal.Wire

Methods

(==) :: HttpMethod -> HttpMethod -> Bool

(/=) :: HttpMethod -> HttpMethod -> Bool

Bounded HttpMethod Source # 
Instance details

Defined in Web.Spock.Internal.Wire

Methods

minBound :: HttpMethod

maxBound :: HttpMethod

Enum HttpMethod Source # 
Instance details

Defined in Web.Spock.Internal.Wire

Methods

succ :: HttpMethod -> HttpMethod

pred :: HttpMethod -> HttpMethod

toEnum :: Int -> HttpMethod

fromEnum :: HttpMethod -> Int

enumFrom :: HttpMethod -> [HttpMethod]

enumFromThen :: HttpMethod -> HttpMethod -> [HttpMethod]

enumFromTo :: HttpMethod -> HttpMethod -> [HttpMethod]

enumFromThenTo :: HttpMethod -> HttpMethod -> HttpMethod -> [HttpMethod]

Generic HttpMethod Source # 
Instance details

Defined in Web.Spock.Internal.Wire

Associated Types

type Rep HttpMethod 
Instance details

Defined in Web.Spock.Internal.Wire

type Rep HttpMethod = D1 ('MetaData "HttpMethod" "Web.Spock.Internal.Wire" "Spock-core-0.16.1.0-inplace" 'True) (C1 ('MetaCons "HttpMethod" 'PrefixI 'True) (S1 ('MetaSel ('Just "unHttpMethod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 StdMethod)))

Methods

from :: HttpMethod -> Rep HttpMethod x

to :: Rep HttpMethod x -> HttpMethod

Show HttpMethod Source # 
Instance details

Defined in Web.Spock.Internal.Wire

Methods

showsPrec :: Int -> HttpMethod -> ShowS

show :: HttpMethod -> String

showList :: [HttpMethod] -> ShowS

Hashable HttpMethod Source # 
Instance details

Defined in Web.Spock.Internal.Wire

Methods

hashWithSalt :: Int -> HttpMethod -> Int

hash :: HttpMethod -> Int

type Rep HttpMethod Source # 
Instance details

Defined in Web.Spock.Internal.Wire

type Rep HttpMethod = D1 ('MetaData "HttpMethod" "Web.Spock.Internal.Wire" "Spock-core-0.16.1.0-inplace" 'True) (C1 ('MetaCons "HttpMethod" 'PrefixI 'True) (S1 ('MetaSel ('Just "unHttpMethod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 StdMethod)))