cabal-version: 2.2 name: byline version: 1.1.0.0 homepage: https://github.com/pjones/byline bug-reports: https://github.com/pjones/byline/issues license: BSD-2-Clause license-file: LICENSE author: Peter Jones maintainer: Peter Jones copyright: Copyright: (c) 2015-2020 Peter J. Jones category: System, User Interfaces build-type: Simple stability: stable tested-with: GHC ==8.6.5 || ==8.8.4 || ==8.10.2 synopsis: Library for creating command-line interfaces (colors, menus, etc.) description: Byline simplifies writing interactive command-line applications by building upon @ansi-terminal@ and @haskeline@. This makes it possible to print messages and prompts that include terminal escape sequences (such as setting text colors) that are automatically disabled when standard input is a file. It also means that Byline works on both POSIX-compatible systems and on Windows. . The primary features of Byline include printing messages, prompting for input, and generating custom menus. It was inspired by the @highline@ Ruby library and the @terminal@ library by Craig Roche. . == Example . > example :: MonadByline m => m Text > example = do > sayLn ("Hey, I like " <> ("Haskell" <> fg magenta) <> "!") > > let question = > "What's " > <> ("your" <> bold) > <> " favorite " > <> ("language" <> fg green <> underline) > <> "? " > > askLn question (Just "Haskell") . <> -------------------------------------------------------------------------------- extra-source-files: CHANGES.md README.md examples/*.hs -------------------------------------------------------------------------------- source-repository head type: git location: https://github.com/pjones/byline.git -------------------------------------------------------------------------------- flag build-examples description: Build examples when building the library. manual: True default: False -------------------------------------------------------------------------------- common options default-language: Haskell2010 default-extensions: DefaultSignatures DeriveFoldable DeriveFunctor DeriveTraversable DerivingStrategies ExistentialQuantification FlexibleContexts FlexibleInstances FunctionalDependencies GeneralizedNewtypeDeriving InstanceSigs KindSignatures LambdaCase MultiParamTypeClasses NamedFieldPuns OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables TupleSections TypeFamilies ghc-options: -Wall -Wno-name-shadowing -Werror=incomplete-record-updates -Werror=incomplete-uni-patterns -Werror=missing-home-modules -Widentities -Wmissing-export-lists -Wredundant-constraints -------------------------------------------------------------------------------- common dependencies build-depends: , ansi-terminal >=0.6 && <0.12 , attoparsec ^>=0.13 , base >=4.9 && <5.0 , colour ^>=2.3 , exceptions >=0.8 && <0.11 , free ^>=5.1 , haskeline >=0.8 && <0.8.2 , mtl >=2.1 && <2.3 , optparse-applicative >=0.16 , relude >=0.6 && <0.8 , terminfo-hs >=0.1 && <0.3 , text >=0.11 && <1.3 mixins: base hiding (Prelude), relude (Relude as Prelude, Relude.Extra.Map) -------------------------------------------------------------------------------- library import: options, dependencies hs-source-dirs: src exposed-modules: Byline Byline.Completion Byline.Exit Byline.Internal.Color Byline.Internal.Completion Byline.Internal.Eval Byline.Internal.Prim Byline.Internal.Simulation Byline.Internal.Stylized Byline.Internal.Types Byline.Menu Byline.Shell Byline.Simulation ------------------------------------------------------------------------------ test-suite test import: options, dependencies type: exitcode-stdio-1.0 hs-source-dirs: test main-is: Main.hs build-depends: , byline , tasty >=1.2 , tasty-hunit ^>=0.10 -------------------------------------------------------------------------------- executable demo import: options, dependencies main-is: examples/demo.hs build-depends: byline if !flag(build-examples) buildable: False -------------------------------------------------------------------------------- executable simple import: options, dependencies main-is: examples/simple.hs build-depends: byline if !flag(build-examples) buildable: False -------------------------------------------------------------------------------- executable menu import: options, dependencies main-is: examples/menu.hs build-depends: byline if !flag(build-examples) buildable: False -------------------------------------------------------------------------------- executable shell import: options, dependencies main-is: examples/shell.hs build-depends: byline if !flag(build-examples) buildable: False