Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- newtype Named name x = Named {
- unnamed :: x
- class RenderableSymbol a where
- renderSymbol :: Text
- newtype RenderableTypeName a = RenderableTypeName a
- class GRenderableSymbol f where
- type family FindName n (api :: Type) :: (n, Type) where ...
- type family AddPrefix x napi where ...
- type family LiftNamed' napi where ...
- type family Flatten api where ...
- type family Flatten1 x api where ...
- type family LiftFlatNamed n api where ...
- type LiftNamedOfKind n api = LiftFlatNamed n (Flatten api)
- type LiftNamed api = LiftNamedOfKind Symbol api
- type family MappendMaybe (x :: Maybe k) (y :: Maybe k) :: Maybe k where ...
- type family FMap (f :: a -> b) (m :: Maybe a) :: Maybe b where ...
- type family LookupEndpoint api name :: Maybe Type where ...
- type HasEndpoint api endpoint name = 'Just endpoint ~ LookupEndpoint api name
- namedClient :: forall api (name :: Symbol) m endpoint. (HasEndpoint api endpoint name, HasClient m endpoint) => Client m endpoint
- type family x ::> api
Documentation
Instances
RoutesToPaths api => RoutesToPaths (Named name api :: Type) Source # | |
Defined in Wire.API.Routes.Named | |
HasLink endpoint => HasLink (Named name endpoint :: Type) Source # | |
HasClient m api => HasClient m (Named n api) Source # | |
Defined in Wire.API.Routes.Named | |
(HasOpenApi api, RenderableSymbol name) => HasOpenApi (Named name api :: Type) Source # | |
HasServer api ctx => HasServer (Named name api :: Type) ctx Source # | |
Defined in Wire.API.Routes.Named | |
Functor (Named name) Source # | |
type SpecialiseToVersion (v :: k1) (Named n api) Source # | |
Defined in Wire.API.Routes.SpecialiseToVersion | |
type Client m (Named n api) Source # | |
Defined in Wire.API.Routes.Named | |
type x ::> (Named name api) Source # | |
Defined in Wire.API.Routes.Named | |
type SpecialiseToVersion v (Named n api) Source # | |
Defined in Wire.API.Routes.Version | |
type MkLink (Named name endpoint :: Type) a Source # | |
Defined in Wire.API.Routes.Named | |
type ServerT (Named name api :: Type) m Source # | |
class RenderableSymbol a where Source #
For HasSwagger
instance of Named
. KnownSymbol
isn't enough because we're using
types other than string literals in some places.
renderSymbol :: Text Source #
Instances
newtype RenderableTypeName a Source #
Instances
GRenderableSymbol (Rep a) => RenderableSymbol (RenderableTypeName a :: Type) Source # | |
Defined in Wire.API.Routes.Named renderSymbol :: Text Source # |
class GRenderableSymbol f where Source #
grenderSymbol :: Text Source #
Instances
KnownSymbol tyName => GRenderableSymbol (D1 ('MetaData tyName modName pkg b) k2 :: k1 -> Type) Source # | |
Defined in Wire.API.Routes.Named grenderSymbol :: Text Source # |
type family LiftNamed' napi where ... Source #
LiftNamed' '(name, api) = Named name api |
type family LiftFlatNamed n api where ... Source #
LiftFlatNamed n (api1 :<|> api2) = LiftFlatNamed n api1 :<|> LiftFlatNamed n api2 | |
LiftFlatNamed n api = LiftNamed' (FindName n api) |
type LiftNamedOfKind n api = LiftFlatNamed n (Flatten api) Source #
type LiftNamed api = LiftNamedOfKind Symbol api Source #
type family MappendMaybe (x :: Maybe k) (y :: Maybe k) :: Maybe k where ... Source #
MappendMaybe 'Nothing y = y | |
MappendMaybe ('Just x) y = 'Just x |
type family LookupEndpoint api name :: Maybe Type where ... Source #
LookupEndpoint (Named name endpoint) name = 'Just endpoint | |
LookupEndpoint (api1 :<|> api2) name = MappendMaybe (LookupEndpoint api1 name) (LookupEndpoint api2 name) | |
LookupEndpoint (prefix :> api) name = FMap ((:>) prefix) (LookupEndpoint api name) | |
LookupEndpoint api name = 'Nothing |
type HasEndpoint api endpoint name = 'Just endpoint ~ LookupEndpoint api name Source #
namedClient :: forall api (name :: Symbol) m endpoint. (HasEndpoint api endpoint name, HasClient m endpoint) => Client m endpoint Source #
Return a client for a named endpoint.