packages feed

calamity 0.3.0.0 → 0.4.0.0

raw patch · 3 files changed

+115/−109 lines, 3 filesdep ~calamity-commandsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: calamity-commands

API changes (from Hackage documentation)

+ Calamity.Commands.Types: type DSLC c r = DSLC IO c () r
- Calamity.Cache.Eff: delDM :: forall r_adJ5H. Member CacheEff r_adJ5H => Snowflake DMChannel -> Sem r_adJ5H ()
+ Calamity.Cache.Eff: delDM :: forall r_adK4m. Member CacheEff r_adK4m => Snowflake DMChannel -> Sem r_adK4m ()
- Calamity.Cache.Eff: delGuild :: forall r_adJ5A. Member CacheEff r_adJ5A => Snowflake Guild -> Sem r_adJ5A ()
+ Calamity.Cache.Eff: delGuild :: forall r_adK4f. Member CacheEff r_adK4f => Snowflake Guild -> Sem r_adK4f ()
- Calamity.Cache.Eff: delMessage :: forall r_adJ62. Member CacheEff r_adJ62 => Snowflake Message -> Sem r_adJ62 ()
+ Calamity.Cache.Eff: delMessage :: forall r_adK4H. Member CacheEff r_adK4H => Snowflake Message -> Sem r_adK4H ()
- Calamity.Cache.Eff: delUnavailableGuild :: forall r_adJ5V. Member CacheEff r_adJ5V => Snowflake Guild -> Sem r_adJ5V ()
+ Calamity.Cache.Eff: delUnavailableGuild :: forall r_adK4A. Member CacheEff r_adK4A => Snowflake Guild -> Sem r_adK4A ()
- Calamity.Cache.Eff: delUser :: forall r_adJ5O. Member CacheEff r_adJ5O => Snowflake User -> Sem r_adJ5O ()
+ Calamity.Cache.Eff: delUser :: forall r_adK4t. Member CacheEff r_adK4t => Snowflake User -> Sem r_adK4t ()
- Calamity.Cache.Eff: getBotUser :: forall r_adJ5s. Member CacheEff r_adJ5s => Sem r_adJ5s (Maybe User)
+ Calamity.Cache.Eff: getBotUser :: forall r_adK47. Member CacheEff r_adK47 => Sem r_adK47 (Maybe User)
- Calamity.Cache.Eff: getDM :: forall r_adJ5E. Member CacheEff r_adJ5E => Snowflake DMChannel -> Sem r_adJ5E (Maybe DMChannel)
+ Calamity.Cache.Eff: getDM :: forall r_adK4j. Member CacheEff r_adK4j => Snowflake DMChannel -> Sem r_adK4j (Maybe DMChannel)
- Calamity.Cache.Eff: getDMs :: forall r_adJ5G. Member CacheEff r_adJ5G => Sem r_adJ5G [DMChannel]
+ Calamity.Cache.Eff: getDMs :: forall r_adK4l. Member CacheEff r_adK4l => Sem r_adK4l [DMChannel]
- Calamity.Cache.Eff: getGuild :: forall r_adJ5v. Member CacheEff r_adJ5v => Snowflake Guild -> Sem r_adJ5v (Maybe Guild)
+ Calamity.Cache.Eff: getGuild :: forall r_adK4a. Member CacheEff r_adK4a => Snowflake Guild -> Sem r_adK4a (Maybe Guild)
- Calamity.Cache.Eff: getGuildChannel :: forall r_adJ5x. Member CacheEff r_adJ5x => Snowflake GuildChannel -> Sem r_adJ5x (Maybe GuildChannel)
+ Calamity.Cache.Eff: getGuildChannel :: forall r_adK4c. Member CacheEff r_adK4c => Snowflake GuildChannel -> Sem r_adK4c (Maybe GuildChannel)
- Calamity.Cache.Eff: getGuilds :: forall r_adJ5z. Member CacheEff r_adJ5z => Sem r_adJ5z [Guild]
+ Calamity.Cache.Eff: getGuilds :: forall r_adK4e. Member CacheEff r_adK4e => Sem r_adK4e [Guild]
- Calamity.Cache.Eff: getMessage :: forall r_adJ5Z. Member CacheEff r_adJ5Z => Snowflake Message -> Sem r_adJ5Z (Maybe Message)
+ Calamity.Cache.Eff: getMessage :: forall r_adK4E. Member CacheEff r_adK4E => Snowflake Message -> Sem r_adK4E (Maybe Message)
- Calamity.Cache.Eff: getMessages :: forall r_adJ61. Member CacheEff r_adJ61 => Sem r_adJ61 [Message]
+ Calamity.Cache.Eff: getMessages :: forall r_adK4G. Member CacheEff r_adK4G => Sem r_adK4G [Message]
- Calamity.Cache.Eff: getUnavailableGuilds :: forall r_adJ5U. Member CacheEff r_adJ5U => Sem r_adJ5U [Snowflake Guild]
+ Calamity.Cache.Eff: getUnavailableGuilds :: forall r_adK4z. Member CacheEff r_adK4z => Sem r_adK4z [Snowflake Guild]
- Calamity.Cache.Eff: getUser :: forall r_adJ5L. Member CacheEff r_adJ5L => Snowflake User -> Sem r_adJ5L (Maybe User)
+ Calamity.Cache.Eff: getUser :: forall r_adK4q. Member CacheEff r_adK4q => Snowflake User -> Sem r_adK4q (Maybe User)
- Calamity.Cache.Eff: getUsers :: forall r_adJ5N. Member CacheEff r_adJ5N => Sem r_adJ5N [User]
+ Calamity.Cache.Eff: getUsers :: forall r_adK4s. Member CacheEff r_adK4s => Sem r_adK4s [User]
- Calamity.Cache.Eff: isUnavailableGuild :: forall r_adJ5S. Member CacheEff r_adJ5S => Snowflake Guild -> Sem r_adJ5S Bool
+ Calamity.Cache.Eff: isUnavailableGuild :: forall r_adK4x. Member CacheEff r_adK4x => Snowflake Guild -> Sem r_adK4x Bool
- Calamity.Cache.Eff: setBotUser :: forall r_adJ5q. Member CacheEff r_adJ5q => User -> Sem r_adJ5q ()
+ Calamity.Cache.Eff: setBotUser :: forall r_adK45. Member CacheEff r_adK45 => User -> Sem r_adK45 ()
- Calamity.Cache.Eff: setDM :: forall r_adJ5C. Member CacheEff r_adJ5C => DMChannel -> Sem r_adJ5C ()
+ Calamity.Cache.Eff: setDM :: forall r_adK4h. Member CacheEff r_adK4h => DMChannel -> Sem r_adK4h ()
- Calamity.Cache.Eff: setGuild :: forall r_adJ5t. Member CacheEff r_adJ5t => Guild -> Sem r_adJ5t ()
+ Calamity.Cache.Eff: setGuild :: forall r_adK48. Member CacheEff r_adK48 => Guild -> Sem r_adK48 ()
- Calamity.Cache.Eff: setMessage :: forall r_adJ5X. Member CacheEff r_adJ5X => Message -> Sem r_adJ5X ()
+ Calamity.Cache.Eff: setMessage :: forall r_adK4C. Member CacheEff r_adK4C => Message -> Sem r_adK4C ()
- Calamity.Cache.Eff: setUnavailableGuild :: forall r_adJ5Q. Member CacheEff r_adJ5Q => Snowflake Guild -> Sem r_adJ5Q ()
+ Calamity.Cache.Eff: setUnavailableGuild :: forall r_adK4v. Member CacheEff r_adK4v => Snowflake Guild -> Sem r_adK4v ()
- Calamity.Cache.Eff: setUser :: forall r_adJ5J. Member CacheEff r_adJ5J => User -> Sem r_adJ5J ()
+ Calamity.Cache.Eff: setUser :: forall r_adK4o. Member CacheEff r_adK4o => User -> Sem r_adK4o ()
- Calamity.Commands.Dsl: command :: forall ps c r. (Member (Final IO) r, CommandContext IO c (), TypedCommandC ps c () r) => Text -> (c -> CommandForParsers ps r ()) -> Sem (DSLState c r) (Command c)
+ Calamity.Commands.Dsl: command :: forall ps c r. (Member (Final IO) r, DSLC c r, CommandContext IO c (), TypedCommandC ps c () r) => Text -> (c -> CommandForParsers ps r ()) -> Sem r (Command c)
- Calamity.Commands.Dsl: command' :: Member (Final IO) r => Text -> [ParameterInfo] -> (c -> Sem r (Either CommandError a)) -> ((c, a) -> Sem (Fail : r) ()) -> Sem (DSLState c r) (Command c)
+ Calamity.Commands.Dsl: command' :: (Member (Final IO) r, DSLC c r) => Text -> [ParameterInfo] -> (c -> Sem r (Either CommandError a)) -> ((c, a) -> Sem (Fail : r) ()) -> Sem r (Command c)
- Calamity.Commands.Dsl: commandA :: forall ps c r. (Member (Final IO) r, CommandContext IO c (), TypedCommandC ps c () r) => Text -> [Text] -> (c -> CommandForParsers ps r ()) -> Sem (DSLState c r) (Command c)
+ Calamity.Commands.Dsl: commandA :: forall ps c r. (Member (Final IO) r, DSLC c r, CommandContext IO c (), TypedCommandC ps c () r) => Text -> [Text] -> (c -> CommandForParsers ps r ()) -> Sem r (Command c)
- Calamity.Commands.Dsl: commandA' :: Member (Final IO) r => Text -> [Text] -> [ParameterInfo] -> (c -> Sem r (Either CommandError a)) -> ((c, a) -> Sem (Fail : r) ()) -> Sem (DSLState c r) (Command c)
+ Calamity.Commands.Dsl: commandA' :: (Member (Final IO) r, DSLC c r) => Text -> [Text] -> [ParameterInfo] -> (c -> Sem r (Either CommandError a)) -> ((c, a) -> Sem (Fail : r) ()) -> Sem r (Command c)
- Calamity.Commands.Dsl: fetchHandler :: Sem (DSLState c r) (CommandHandler c)
+ Calamity.Commands.Dsl: fetchHandler :: DSLC c r => Sem r (CommandHandler c)
- Calamity.Commands.Dsl: group :: Member (Final IO) r => Text -> Sem (DSLState c r) a -> Sem (DSLState c r) a
+ Calamity.Commands.Dsl: group :: (Member (Final IO) r, DSLC c r) => Text -> Sem r a -> Sem r a
- Calamity.Commands.Dsl: group' :: Member (Final IO) r => Text -> Sem (DSLState c r) a -> Sem (DSLState c r) a
+ Calamity.Commands.Dsl: group' :: (Member (Final IO) r, DSLC c r) => Text -> Sem r a -> Sem r a
- Calamity.Commands.Dsl: groupA :: Member (Final IO) r => Text -> [Text] -> Sem (DSLState c r) a -> Sem (DSLState c r) a
+ Calamity.Commands.Dsl: groupA :: (Member (Final IO) r, DSLC c r) => Text -> [Text] -> Sem r a -> Sem r a
- Calamity.Commands.Dsl: groupA' :: Member (Final IO) r => Text -> [Text] -> Sem (DSLState c r) a -> Sem (DSLState c r) a
+ Calamity.Commands.Dsl: groupA' :: (Member (Final IO) r, DSLC c r) => Text -> [Text] -> Sem r a -> Sem r a
- Calamity.Commands.Dsl: requires :: [Check c] -> Sem (DSLState c r) a -> Sem (DSLState c r) a
+ Calamity.Commands.Dsl: requires :: DSLC c r => [Check c] -> Sem r a -> Sem r a
- Calamity.Commands.Dsl: requires' :: Member (Final IO) r => Text -> (c -> Sem r (Maybe Text)) -> Sem (DSLState c r) a -> Sem (DSLState c r) a
+ Calamity.Commands.Dsl: requires' :: (Member (Final IO) r, DSLC c r) => Text -> (c -> Sem r (Maybe Text)) -> Sem r a -> Sem r a
- Calamity.Commands.Dsl: requiresPure :: [(Text, c -> Maybe Text)] -> Sem (DSLState c r) a -> Sem (DSLState c r) a
+ Calamity.Commands.Dsl: requiresPure :: DSLC c r => [(Text, c -> Maybe Text)] -> Sem r a -> Sem r a
- Calamity.HTTP.Internal.Ratelimit: getRatelimitState :: forall r_ae7YB. Member RatelimitEff r_ae7YB => Sem r_ae7YB RateLimitState
+ Calamity.HTTP.Internal.Ratelimit: getRatelimitState :: forall r_ae8X9. Member RatelimitEff r_ae8X9 => Sem r_ae8X9 RateLimitState
- Calamity.Interactions.Eff: getInteraction :: forall r_acos6. Member InteractionEff r_acos6 => Sem r_acos6 Interaction
+ Calamity.Interactions.Eff: getInteraction :: forall r_acpqN. Member InteractionEff r_acpqN => Sem r_acpqN Interaction
- Calamity.Interactions.View: endView :: forall ret_ai9f5 inp_ai9f6 sendResp_ai9f7 r_ai9tn. Member (ViewEff ret_ai9f5 inp_ai9f6 sendResp_ai9f7) r_ai9tn => ret_ai9f5 -> Sem r_ai9tn ()
+ Calamity.Interactions.View: endView :: forall ret_aiadD inp_aiadE sendResp_aiadF r_aiarV. Member (ViewEff ret_aiadD inp_aiadE sendResp_aiadF) r_aiarV => ret_aiadD -> Sem r_aiarV ()
- Calamity.Interactions.View: getSendResponse :: forall ret_ai9fd inp_ai9fe sendResp_ai9ff r_ai9ts. Member (ViewEff ret_ai9fd inp_ai9fe sendResp_ai9ff) r_ai9ts => Sem r_ai9ts sendResp_ai9ff
+ Calamity.Interactions.View: getSendResponse :: forall ret_aiadL inp_aiadM sendResp_aiadN r_aias0. Member (ViewEff ret_aiadL inp_aiadM sendResp_aiadN) r_aias0 => Sem r_aias0 sendResp_aiadN
- Calamity.Interactions.View: replaceView :: forall ret_ai9fb inp_ai9f9 sendResp_ai9fc r_ai9tp. Member (ViewEff ret_ai9fb inp_ai9f9 sendResp_ai9fc) r_ai9tp => View inp_ai9f9 -> ([Component] -> Sem r_ai9tp ()) -> Sem r_ai9tp ()
+ Calamity.Interactions.View: replaceView :: forall ret_aiadJ inp_aiadH sendResp_aiadK r_aiarX. Member (ViewEff ret_aiadJ inp_aiadH sendResp_aiadK) r_aiarX => View inp_aiadH -> ([Component] -> Sem r_aiarX ()) -> Sem r_aiarX ()
- Calamity.Internal.LocalWriter: llisten :: forall o_ayf2 r_aygy a_Xyf2. Member (LocalWriter o_ayf2) r_aygy => Sem r_aygy a_Xyf2 -> Sem r_aygy (o_ayf2, a_Xyf2)
+ Calamity.Internal.LocalWriter: llisten :: forall o_azdO r_azfk a_XzdO. Member (LocalWriter o_azdO) r_azfk => Sem r_azfk a_XzdO -> Sem r_azfk (o_azdO, a_XzdO)
- Calamity.Internal.LocalWriter: ltell :: forall o_ayeY r_aygw. Member (LocalWriter o_ayeY) r_aygw => o_ayeY -> Sem r_aygw ()
+ Calamity.Internal.LocalWriter: ltell :: forall o_azdK r_azfi. Member (LocalWriter o_azdK) r_azfi => o_azdK -> Sem r_azfi ()
- Calamity.Metrics.Eff: addCounter :: forall r_aHee. Member MetricEff r_aHee => Int -> Counter -> Sem r_aHee Int
+ Calamity.Metrics.Eff: addCounter :: forall r_aIcW. Member MetricEff r_aIcW => Int -> Counter -> Sem r_aIcW Int
- Calamity.Metrics.Eff: modifyGauge :: forall r_aHeh. Member MetricEff r_aHeh => (Double -> Double) -> Gauge -> Sem r_aHeh Double
+ Calamity.Metrics.Eff: modifyGauge :: forall r_aIcZ. Member MetricEff r_aIcZ => (Double -> Double) -> Gauge -> Sem r_aIcZ Double
- Calamity.Metrics.Eff: observeHistogram :: forall r_aHek. Member MetricEff r_aHek => Double -> Histogram -> Sem r_aHek HistogramSample
+ Calamity.Metrics.Eff: observeHistogram :: forall r_aId2. Member MetricEff r_aId2 => Double -> Histogram -> Sem r_aId2 HistogramSample
- Calamity.Metrics.Eff: registerCounter :: forall r_aHe4. Member MetricEff r_aHe4 => Text -> [(Text, Text)] -> Sem r_aHe4 Counter
+ Calamity.Metrics.Eff: registerCounter :: forall r_aIcM. Member MetricEff r_aIcM => Text -> [(Text, Text)] -> Sem r_aIcM Counter
- Calamity.Metrics.Eff: registerGauge :: forall r_aHe7. Member MetricEff r_aHe7 => Text -> [(Text, Text)] -> Sem r_aHe7 Gauge
+ Calamity.Metrics.Eff: registerGauge :: forall r_aIcP. Member MetricEff r_aIcP => Text -> [(Text, Text)] -> Sem r_aIcP Gauge
- Calamity.Metrics.Eff: registerHistogram :: forall r_aHea. Member MetricEff r_aHea => Text -> [(Text, Text)] -> [Double] -> Sem r_aHea Histogram
+ Calamity.Metrics.Eff: registerHistogram :: forall r_aIcS. Member MetricEff r_aIcS => Text -> [(Text, Text)] -> [Double] -> Sem r_aIcS Histogram
- Calamity.Types.TokenEff: getBotToken :: forall r_ae7UD. Member TokenEff r_ae7UD => Sem r_ae7UD Token
+ Calamity.Types.TokenEff: getBotToken :: forall r_ae8Tb. Member TokenEff r_ae8Tb => Sem r_ae8Tb Token

Files

Calamity/Commands/Dsl.hs view
@@ -6,23 +6,23 @@  documentation more tuned for usage with Calamity. -} module Calamity.Commands.Dsl (-    -- * Commands DSL-    -- $dslTutorial-    command,-    command',-    commandA,-    commandA',-    hide,-    help,-    requires,-    requires',-    requiresPure,-    group,-    group',-    groupA,-    groupA',-    DSLState,-    fetchHandler,+  -- * Commands DSL+  -- $dslTutorial+  command,+  command',+  commandA,+  commandA',+  hide,+  help,+  requires,+  requires',+  requiresPure,+  group,+  group',+  groupA,+  groupA',+  DSLState,+  fetchHandler, ) where  import qualified CalamityCommands.Dsl as CC@@ -92,16 +92,16 @@  reader context. -} command' ::-    P.Member (P.Final IO) r =>-    -- | The name of the command-    T.Text ->-    -- | The command's parameters-    [ParameterInfo] ->-    -- | The parser for this command-    (c -> P.Sem r (Either CommandError a)) ->-    -- | The callback for this command-    ((c, a) -> P.Sem (P.Fail ': r) ()) ->-    P.Sem (DSLState c r) (Command c)+  (P.Member (P.Final IO) r, DSLC c r) =>+  -- | The name of the command+  T.Text ->+  -- | The command's parameters+  [ParameterInfo] ->+  -- | The parser for this command+  (c -> P.Sem r (Either CommandError a)) ->+  -- | The callback for this command+  ((c, a) -> P.Sem (P.Fail ': r) ()) ->+  P.Sem r (Command c) command' = CC.command'  {- | Given the command name, aliases, and parameter names, @parser@ and@@ -112,18 +112,18 @@  reader context. -} commandA' ::-    P.Member (P.Final IO) r =>-    -- | The name of the command-    T.Text ->-    -- | The aliases for the command-    [T.Text] ->-    -- | The command's parameters-    [ParameterInfo] ->-    -- | The parser for this command-    (c -> P.Sem r (Either CommandError a)) ->-    -- | The callback for this command-    ((c, a) -> P.Sem (P.Fail ': r) ()) ->-    P.Sem (DSLState c r) (Command c)+  (P.Member (P.Final IO) r, DSLC c r) =>+  -- | The name of the command+  T.Text ->+  -- | The aliases for the command+  [T.Text] ->+  -- | The command's parameters+  [ParameterInfo] ->+  -- | The parser for this command+  (c -> P.Sem r (Either CommandError a)) ->+  -- | The callback for this command+  ((c, a) -> P.Sem (P.Fail ': r) ()) ->+  P.Sem r (Command c) commandA' = CC.commandA'  {- | Given the name of a command and a callback, and a type level list of@@ -152,16 +152,17 @@  @ -} command ::-    forall ps c r.-    ( P.Member (P.Final IO) r-    , CC.CommandContext IO c ()-    , TypedCommandC ps c () r-    ) =>-    -- | The name of the command-    T.Text ->-    -- | The callback for this command-    (c -> CommandForParsers ps r ()) ->-    P.Sem (DSLState c r) (Command c)+  forall ps c r.+  ( P.Member (P.Final IO) r+  , DSLC c r+  , CC.CommandContext IO c ()+  , TypedCommandC ps c () r+  ) =>+  -- | The name of the command+  T.Text ->+  -- | The callback for this command+  (c -> CommandForParsers ps r ()) ->+  P.Sem r (Command c) command = CC.command @ps  {- | Given the name and aliases of a command and a callback, and a type level list of@@ -185,44 +186,46 @@  @ -} commandA ::-    forall ps c r.-    ( P.Member (P.Final IO) r-    , CC.CommandContext IO c ()-    , TypedCommandC ps c () r-    ) =>-    -- | The name of the command-    T.Text ->-    -- | The aliases for the command-    [T.Text] ->-    -- | The callback for this command-    (c -> CommandForParsers ps r ()) ->-    P.Sem (DSLState c r) (Command c)+  forall ps c r.+  ( P.Member (P.Final IO) r+  , DSLC c r+  , CC.CommandContext IO c ()+  , TypedCommandC ps c () r+  ) =>+  -- | The name of the command+  T.Text ->+  -- | The aliases for the command+  [T.Text] ->+  -- | The callback for this command+  (c -> CommandForParsers ps r ()) ->+  P.Sem r (Command c) commandA = CC.commandA @ps  {- | Set the visibility of any groups or commands registered inside the given  action to hidden. -} hide ::-    P.Member (P.Tagged "hidden" (P.Reader Bool)) r =>-    P.Sem r a ->-    P.Sem r a+  P.Member (P.Tagged "hidden" (P.Reader Bool)) r =>+  P.Sem r a ->+  P.Sem r a hide = CC.hide  -- | Set the help for any groups or commands registered inside the given action. help ::-    P.Member (P.Reader (c -> T.Text)) r =>-    (c -> T.Text) ->-    P.Sem r a ->-    P.Sem r a+  P.Member (P.Reader (c -> T.Text)) r =>+  (c -> T.Text) ->+  P.Sem r a ->+  P.Sem r a help = CC.help  {- | Add to the list of checks for any commands registered inside the given  action. -} requires ::-    [Check c] ->-    P.Sem (DSLState c r) a ->-    P.Sem (DSLState c r) a+  DSLC c r =>+  [Check c] ->+  P.Sem r a ->+  P.Sem r a requires = CC.requires  {- | Construct a check and add it to the list of checks for any commands@@ -231,13 +234,13 @@  Refer to 'CalamityCommands.Check.Check' for more info on checks. -} requires' ::-    P.Member (P.Final IO) r =>-    -- | The name of the check-    T.Text ->-    -- | The callback for the check-    (c -> P.Sem r (Maybe T.Text)) ->-    P.Sem (DSLState c r) a ->-    P.Sem (DSLState c r) a+  (P.Member (P.Final IO) r, DSLC c r) =>+  -- | The name of the check+  T.Text ->+  -- | The callback for the check+  (c -> P.Sem r (Maybe T.Text)) ->+  P.Sem r a ->+  P.Sem r a requires' = CC.requires'  {- | Construct some pure checks and add them to the list of checks for any@@ -246,10 +249,11 @@  Refer to 'CalamityCommands.Check.Check' for more info on checks. -} requiresPure ::-    [(T.Text, c -> Maybe T.Text)] ->-    -- A list of check names and check callbacks-    P.Sem (DSLState c r) a ->-    P.Sem (DSLState c r) a+  DSLC c r =>+  [(T.Text, c -> Maybe T.Text)] ->+  -- A list of check names and check callbacks+  P.Sem r a ->+  P.Sem r a requiresPure = CC.requiresPure  {- | Construct a group and place any commands registered in the given action@@ -259,11 +263,11 @@  'group'' if you don't want that (i.e. your help function is context aware). -} group ::-    P.Member (P.Final IO) r =>-    -- | The name of the group-    T.Text ->-    P.Sem (DSLState c r) a ->-    P.Sem (DSLState c r) a+  (P.Member (P.Final IO) r, DSLC c r) =>+  -- | The name of the group+  T.Text ->+  P.Sem r a ->+  P.Sem r a group = CC.group  {- | Construct a group with aliases and place any commands registered in the@@ -276,13 +280,13 @@  'group'' if you don't want that (i.e. your help function is context aware). -} groupA ::-    P.Member (P.Final IO) r =>-    -- | The name of the group-    T.Text ->-    -- | The aliases of the group-    [T.Text] ->-    P.Sem (DSLState c r) a ->-    P.Sem (DSLState c r) a+  (P.Member (P.Final IO) r, DSLC c r) =>+  -- | The name of the group+  T.Text ->+  -- | The aliases of the group+  [T.Text] ->+  P.Sem r a ->+  P.Sem r a groupA = CC.groupA  {- | Construct a group and place any commands registered in the given action@@ -295,11 +299,11 @@  value. -} group' ::-    P.Member (P.Final IO) r =>-    -- | The name of the group-    T.Text ->-    P.Sem (DSLState c r) a ->-    P.Sem (DSLState c r) a+  (P.Member (P.Final IO) r, DSLC c r) =>+  -- | The name of the group+  T.Text ->+  P.Sem r a ->+  P.Sem r a group' = CC.group'  {- | Construct a group with aliases and place any commands registered in the given action@@ -312,15 +316,15 @@  value. -} groupA' ::-    P.Member (P.Final IO) r =>-    -- | The name of the group-    T.Text ->-    -- | The aliases of the group-    [T.Text] ->-    P.Sem (DSLState c r) a ->-    P.Sem (DSLState c r) a+  (P.Member (P.Final IO) r, DSLC c r) =>+  -- | The name of the group+  T.Text ->+  -- | The aliases of the group+  [T.Text] ->+  P.Sem r a ->+  P.Sem r a groupA' = CC.groupA'  -- | Retrieve the final command handler for this block-fetchHandler :: P.Sem (DSLState c r) (CommandHandler c)+fetchHandler :: DSLC c r => P.Sem r (CommandHandler c) fetchHandler = P.ask
Calamity/Commands/Types.hs view
@@ -9,6 +9,7 @@     type CommandHandler,     type Check,     type DSLState,+    type DSLC,     type CommandContext, ) where @@ -24,4 +25,5 @@ type CommandHandler c = CC.CommandHandler IO c () type Check c = CC.Check IO c type DSLState c r = CC.DSLState IO c () r+type DSLC c r = CC.DSLC IO c () r type CommandContext c = CC.CommandContext IO c ()
calamity.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           calamity-version:        0.3.0.0+version:        0.4.0.0 synopsis:       A library for writing discord bots in haskell description:    Please see the README on GitHub at <https://github.com/simmsb/calamity#readme> category:       Network, Web@@ -191,7 +191,7 @@     , async >=2.2 && <3     , base >=4.13 && <5     , bytestring >=0.10 && <0.12-    , calamity-commands ==0.2.*+    , calamity-commands ==0.3.*     , colour >=2.3.5 && <2.4     , concurrent-extra ==0.7.*     , connection >=0.2.6 && <0.4