packages feed

rasa-ext-cmd 0.1.0.0 → 0.1.1

raw patch · 2 files changed

+33/−34 lines, 2 filesdep ~basedep ~containersdep ~data-defaultPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, containers, data-default, lens, rasa, text

API changes (from Hackage documentation)

- Rasa.Ext.Cmd: addCmd :: Text -> (Text -> Action ()) -> Action ()
+ Rasa.Ext.Cmd: addCmd :: String -> (String -> Action ()) -> Action ()
- Rasa.Ext.Cmd: runCmd :: Text -> Text -> Action ()
+ Rasa.Ext.Cmd: runCmd :: String -> String -> Action ()

Files

rasa-ext-cmd.cabal view
@@ -1,33 +1,33 @@-name:                rasa-ext-cmd-version:             0.1.0.0-synopsis:            Rasa Ext for running commands-description:         Rasa Ext for running commands-homepage:            https://github.com/ChrisPenner/rasa/-license:             MIT-license-file:        LICENSE-author:              Chris Penner-maintainer:          christopher.penner@gmail.com-copyright:           2016 Chris Penner-category:            Extension-build-type:          Simple--- extra-source-files:-cabal-version:       >=1.10--library-  hs-source-dirs:      src-  exposed-modules:-                       Rasa.Ext.Cmd+name: rasa-ext-cmd+version: 0.1.1+cabal-version: >=1.10+build-type: Simple+license: MIT+license-file: LICENSE+copyright: 2016 Chris Penner+maintainer: christopher.penner@gmail.com+homepage: https://github.com/ChrisPenner/rasa/+synopsis: Rasa Ext for running commands+description:+    Rasa Ext for running commands+category: Extension+author: Chris Penner -  build-depends:       base >= 4.7 && < 5-                     , rasa-                     , data-default-                     , lens-                     , text-                     , containers-  default-language:    Haskell2010+source-repository head+    type: git+    location: https://github.com/ChrisPenner/rasa -  ghc-options:         -Wall+library+    exposed-modules:+        Rasa.Ext.Cmd+    build-depends:+        base >=4.8 && <5,+        rasa >=0.1.4 && <0.2,+        data-default >=0.7.1.1 && <0.8,+        lens ==4.14.*,+        text >=1.2.2.1 && <1.3,+        containers >=0.5.7.1 && <0.6+    default-language: Haskell2010+    hs-source-dirs: src+    ghc-options: -Wall -source-repository head-  type:     git-  location: https://github.com/ChrisPenner/rasa
src/Rasa/Ext/Cmd.hs view
@@ -11,10 +11,9 @@ import Data.Map import Data.Default import Data.Typeable-import qualified Data.Text as T  data Cmd = Cmd-  { _commands :: Map T.Text (T.Text -> Action ())+  { _commands :: Map String (String -> Action ())   } deriving (Typeable)  instance Show Cmd where@@ -29,10 +28,10 @@  -- It would be nice to make this a little more generic, but I'm not sure how right now. -- TODO try switching to T.Text -> (T.Text -> a) -> Action ()-addCmd :: T.Text -> (T.Text -> Action ()) -> Action ()+addCmd :: String -> (String -> Action ()) -> Action () addCmd alias mkEvent = ext.commands.at alias ?= mkEvent -runCmd :: T.Text -> T.Text -> Action ()+runCmd :: String -> String -> Action () runCmd alias args = do   mCmd <- use (ext.commands.at alias)   case mCmd of