packages feed

commander-0.1.0.0: commander.cabal

name:                commander
version:             0.1.0.0
synopsis:            pattern matching against string based commands
homepage:            https://github.com/jsdw/hs-commander
license:             BSD3
license-file:        LICENSE
author:              James Wilson
maintainer:          me@unbui.lt
copyright:           (c) 2016 James Wilson
stability:           experimental
category:            Text
build-type:          Simple
cabal-version:       >=1.10
description:
    An extensible, format-agnostic command parsing library designed
    to be easy to use and syntactically light weight.
    .
    Assuming we write a parser to convert a command such as
    .
    @calculator add 1 2 -v=yes@
    .
    Into path and flags such as @["calculator", "add"]@ and @Map.fromList [("v","yes")]@,
    This library will then match said path and flags against a nested record type of
    commands built up using lightweight monadic syntax and tries to execute
    the associated function if the matching and value converting works, or returns
    an error if the path/flags fail to match any command.
    .
    To get started, see the documentation for the @Commander@ module
    below. Additionally, an /examples/ folder is included in the source
    illustrating usage - see https://github.com/jsdw/hs-commander for
    more.

extra-source-files:
    README.md
    examples/*.hs

library
  hs-source-dirs:      src
  ghc-options:         -Wall
  exposed-modules:     Commander
                     , Commander.Commands
                     , Commander.Params
  build-depends:       base         >= 4.8   && < 5
                     , containers   >= 0.5   && < 0.6
                     , transformers >= 0.4.2 && < 0.5
                     , mtl          >= 2.2   && < 2.3
  default-language:    Haskell2010

test-suite commander-test
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs
  build-depends:       base
                     , commander
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
  default-language:    Haskell2010

executable example1
  hs-source-dirs:      examples
  main-is:             Example1.hs
  build-depends:       base
                     , commander
                     , containers
  default-language:    Haskell2010

source-repository head
  type:     git
  location: https://github.com/jsdw/hs-commander