Safe Haskell | None |
---|---|
Language | Haskell2010 |
The route type Why I did this I don't know
Synopsis
- mkRouteBuilder :: RouteBuilder '[]
- giveID :: forall t reqs. Typeable t => Snowflake t -> RouteBuilder reqs -> RouteBuilder ('('IDRequirement t, 'Satisfied) ': reqs)
- giveParam :: forall (s :: Symbol) reqs. KnownSymbol s => Text -> RouteBuilder reqs -> RouteBuilder ('('PSRequirement s, 'Satisfied) ': reqs)
- buildRoute :: forall (reqs :: [(RequirementType, RouteRequirement)]). EnsureFulfilled reqs => RouteBuilder reqs -> Route
- routeKey :: Route -> RouteKey
- type RouteKey = (Text, Maybe (Snowflake Channel), Maybe (Snowflake Guild))
- data RouteBuilder (reqstate :: [(RequirementType, RouteRequirement)])
- data RouteRequirement
- data Route
- newtype S = S Text
- data PS (s :: Symbol) = PS
- data ID a = ID
- class Typeable a => RouteFragmentable a reqs where
- type ConsRes a reqs
- (//) :: RouteBuilder reqs -> a -> ConsRes a reqs
Documentation
mkRouteBuilder :: RouteBuilder '[] Source #
giveID :: forall t reqs. Typeable t => Snowflake t -> RouteBuilder reqs -> RouteBuilder ('('IDRequirement t, 'Satisfied) ': reqs) Source #
giveParam :: forall (s :: Symbol) reqs. KnownSymbol s => Text -> RouteBuilder reqs -> RouteBuilder ('('PSRequirement s, 'Satisfied) ': reqs) Source #
buildRoute :: forall (reqs :: [(RequirementType, RouteRequirement)]). EnsureFulfilled reqs => RouteBuilder reqs -> Route Source #
data RouteBuilder (reqstate :: [(RequirementType, RouteRequirement)]) Source #
data RouteRequirement Source #
Instances
Eq RouteRequirement Source # | |
Defined in Calamity.HTTP.Internal.Route (==) :: RouteRequirement -> RouteRequirement -> Bool # (/=) :: RouteRequirement -> RouteRequirement -> Bool # | |
Show RouteRequirement Source # | |
Defined in Calamity.HTTP.Internal.Route showsPrec :: Int -> RouteRequirement -> ShowS # show :: RouteRequirement -> String # showList :: [RouteRequirement] -> ShowS # | |
Generic RouteRequirement Source # | |
Defined in Calamity.HTTP.Internal.Route type Rep RouteRequirement :: Type -> Type # from :: RouteRequirement -> Rep RouteRequirement x # to :: Rep RouteRequirement x -> RouteRequirement # | |
type Rep RouteRequirement Source # | |
Defined in Calamity.HTTP.Internal.Route type Rep RouteRequirement = D1 ('MetaData "RouteRequirement" "Calamity.HTTP.Internal.Route" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "NotNeeded" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Required" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Satisfied" 'PrefixI 'False) (U1 :: Type -> Type))) |
Instances
Show Route Source # | |
Generic Route Source # | |
type Rep Route Source # | |
Defined in Calamity.HTTP.Internal.Route type Rep Route = D1 ('MetaData "Route" "Calamity.HTTP.Internal.Route" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "Route" 'PrefixI 'True) ((S1 ('MetaSel ('Just "path") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Url 'Https)) :*: S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "channelID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Snowflake Channel))) :*: S1 ('MetaSel ('Just "guildID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Snowflake Guild)))))) |
A static string fragment of a route
Instances
RouteFragmentable S reqs Source # | |
type ConsRes S reqs Source # | |
Defined in Calamity.HTTP.Internal.Route |
data PS (s :: Symbol) Source #
A parameterised string fragment of a route
Instances
KnownSymbol s => RouteFragmentable (PS s) reqs Source # | |
type ConsRes (PS s) reqs Source # | |
Defined in Calamity.HTTP.Internal.Route |
An id fragment of a route
Instances
class Typeable a => RouteFragmentable a reqs where Source #
(//) :: RouteBuilder reqs -> a -> ConsRes a reqs infixl 5 Source #
Instances
RouteFragmentable S reqs Source # | |
KnownSymbol s => RouteFragmentable (PS s) reqs Source # | |
Typeable a => RouteFragmentable (ID a) reqs Source # | |