Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- class ServiceAPI service (v :: Version) where
- type ServiceAPIRoutes service
- type SpecialisedAPIRoutes v service :: Type
- serviceSwagger :: HasOpenApi (SpecialisedAPIRoutes v service) => OpenApi
- data API api r
- hoistAPIHandler :: forall api r n. HasServer api '[Domain] => (forall x. Sem r x -> n x) -> API api r -> ServerT api n
- hoistAPI :: forall api1 api2 r1 r2. (ServerT api1 (Sem r1) -> ServerT api2 (Sem r2)) -> API api1 r1 -> API api2 r2
- mkAPI :: forall r0 api. (HasServer api '[Domain], ServerEffects (DeclaredErrorEffects api) r0) => ServerT api (Sem (Append (DeclaredErrorEffects api) r0)) -> API api r0
- mkNamedAPI :: forall name r0 api. (HasServer api '[Domain], ServerEffects (DeclaredErrorEffects api) r0) => ServerT api (Sem (Append (DeclaredErrorEffects api) r0)) -> API (Named name api) r0
- (<@>) :: API api1 r -> API api2 r -> API (api1 :<|> api2) r
- class ServerEffect eff r where
- interpretServerEffect :: Sem (eff ': r) a -> Sem r a
- class ServerEffects r r1 where
- interpretServerEffects :: Sem (Append r r1) a -> Sem r1 a
- hoistServerWithDomain :: forall api m n. HasServer api '[Domain] => (forall x. m x -> n x) -> ServerT api m -> ServerT api n
Documentation
class ServiceAPI service (v :: Version) where Source #
Nothing
type ServiceAPIRoutes service Source #
type SpecialisedAPIRoutes v service :: Type Source #
type SpecialisedAPIRoutes v service = SpecialiseToVersion v (ServiceAPIRoutes service)
serviceSwagger :: HasOpenApi (SpecialisedAPIRoutes v service) => OpenApi Source #
Instances
A Servant handler on a polysemy stack. This is used to help with type inference.
hoistAPIHandler :: forall api r n. HasServer api '[Domain] => (forall x. Sem r x -> n x) -> API api r -> ServerT api n Source #
hoistAPI :: forall api1 api2 r1 r2. (ServerT api1 (Sem r1) -> ServerT api2 (Sem r2)) -> API api1 r1 -> API api2 r2 Source #
mkAPI :: forall r0 api. (HasServer api '[Domain], ServerEffects (DeclaredErrorEffects api) r0) => ServerT api (Sem (Append (DeclaredErrorEffects api) r0)) -> API api r0 Source #
Convert a polysemy handler to an API
value.
mkNamedAPI :: forall name r0 api. (HasServer api '[Domain], ServerEffects (DeclaredErrorEffects api) r0) => ServerT api (Sem (Append (DeclaredErrorEffects api) r0)) -> API (Named name api) r0 Source #
Convert a polysemy handler to a named API
value.
class ServerEffect eff r where Source #
interpretServerEffect :: Sem (eff ': r) a -> Sem r a Source #
Instances
class ServerEffects r r1 where Source #
Instances
ServerEffects ('[] :: [Effect]) r Source # | |
Defined in Wire.API.Routes.API | |
(ServerEffects r r1, ServerEffect eff (Append r r1)) => ServerEffects (eff ': r) r1 Source # | |
Defined in Wire.API.Routes.API |