packages feed

calamity-commands 0.1.2.0 → 0.1.3.0

raw patch · 3 files changed

+13/−8 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- CalamityCommands.Context: constructContext :: forall msg_aSny ctx_aSnw m'_aSnv a'_aSnx r_aSq9. MemberWithError (ConstructContext msg_aSny ctx_aSnw m'_aSnv a'_aSnx) r_aSq9 => (Text, Command m'_aSnv ctx_aSnw a'_aSnx, Text) -> msg_aSny -> Sem r_aSq9 (Maybe ctx_aSnw)
+ CalamityCommands.Context: constructContext :: forall msg_aFlx ctx_aFlv m'_aFlu a'_aFlw r_aFo7. MemberWithError (ConstructContext msg_aFlx ctx_aFlv m'_aFlu a'_aFlw) r_aFo7 => (Text, Command m'_aFlu ctx_aFlv a'_aFlw, Text) -> msg_aFlx -> Sem r_aFo7 (Maybe ctx_aFlv)
- CalamityCommands.Internal.LocalWriter: llisten :: forall o_aqij r_aqK0 a_Xqij. MemberWithError (LocalWriter o_aqij) r_aqK0 => Sem r_aqK0 a_Xqij -> Sem r_aqK0 (o_aqij, a_Xqij)
+ CalamityCommands.Internal.LocalWriter: llisten :: forall o_ajsg r_ajDx a_Xjsg. MemberWithError (LocalWriter o_ajsg) r_ajDx => Sem r_ajDx a_Xjsg -> Sem r_ajDx (o_ajsg, a_Xjsg)
- CalamityCommands.Internal.LocalWriter: ltell :: forall o_aqif r_aqJY. MemberWithError (LocalWriter o_aqif) r_aqJY => o_aqif -> Sem r_aqJY ()
+ CalamityCommands.Internal.LocalWriter: ltell :: forall o_ajsc r_ajDv. MemberWithError (LocalWriter o_ajsc) r_ajDv => o_ajsc -> Sem r_ajDv ()
- CalamityCommands.ParsePrefix: parsePrefix :: forall msg_aTck r_aTda. MemberWithError (ParsePrefix msg_aTck) r_aTda => msg_aTck -> Sem r_aTda (Maybe (Text, Text))
+ CalamityCommands.ParsePrefix: parsePrefix :: forall msg_aG9X r_aGaN. MemberWithError (ParsePrefix msg_aG9X) r_aGaN => msg_aG9X -> Sem r_aGaN (Maybe (Text, Text))

Files

CalamityCommands/CommandUtils.hs view
@@ -116,7 +116,7 @@   P.Sem r (Command m c a) buildCommand names parent hidden checks help command =   let (parser, cb) = buildTypedCommand @ps command-   in buildCommand' names parent hidden checks (parameterInfos @ps @r) help parser cb+   in buildCommand' names parent hidden checks (parameterInfos @ps @c @r) help parser cb  {- | Given the name of the command the parser is for and a parser function in  the 'P.Sem' monad, build a parser by transforming the Polysemy action into an@@ -164,7 +164,7 @@   ( ApplyTupRes (ParserResult (ListToTup ps)) (CommandSemType r a) ~ CommandForParsers ps r a   , ParameterParser (ListToTup ps) c r   , ApplyTup (ParserResult (ListToTup ps)) (CommandSemType r a)-  , ParameterInfoForParsers ps r+  , ParameterInfoForParsers ps c r   )  buildTypedCommand ::@@ -179,14 +179,14 @@       consumer (ctx, r) = applyTup (cmd ctx) r    in (parser, consumer) -class ParameterInfoForParsers (ps :: [Type]) r where+class ParameterInfoForParsers (ps :: [Type]) c r where   parameterInfos :: [ParameterInfo] -instance ParameterInfoForParsers '[] r where+instance ParameterInfoForParsers '[] c r where   parameterInfos = [] -instance (ParameterParser x c r, ParameterInfoForParsers xs r) => ParameterInfoForParsers (x : xs) r where-  parameterInfos = parameterInfo @x @c @r : parameterInfos @xs @r+instance (ParameterParser x c r, ParameterInfoForParsers xs c r) => ParameterInfoForParsers (x : xs) c r where+  parameterInfos = parameterInfo @x @c @r : parameterInfos @xs @c @r  class ApplyTup a b where   type ApplyTupRes a b
ChangeLog.md view
@@ -1,5 +1,10 @@ # Changelog for Calamity Commands +## 0.1.3.0+++ Fixed some parameter parser instances causing type inference to fail+  ([#48](https://github.com/simmsb/calamity/pull/48)).+ ## 0.1.2.0  + Changed the command parameter machinery to hold more info about parameters.
calamity-commands.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 962098e7be30e39345aaa5a511635824c3654c1f199212a575271f3d7e6f5c60+-- hash: ec3fda8daa0c65a69c2b8cfae6a5cb025d8069ab3fe541918c0d14456fa3143b  name:           calamity-commands-version:        0.1.2.0+version:        0.1.3.0 synopsis:       A library for declaring, parsing, and invoking text-input based commands description:    Please see the README on GitHub at <https://github.com/simmsb/calamity#readme> category:       Utils