packages feed

cfv-0.1.0.0: cfv.cabal

cabal-version:      3.14
name:               cfv
version:            0.1.0.0
synopsis:           A simple file format for configuration variables
license:            BSD-3-Clause
license-file:       LICENSE
author:             Harley D. Eades III
maintainer:         harley.eades@gmail.com
homepage:           https://github.com/heades/cfv
bug-reports:        https://github.com/heades/cfv/issues   
category:           Development
build-type:         Simple
extra-doc-files:
    CHANGELOG.md
    README.md
extra-source-files:
    test/files/basic.cfv
tested-with:     
    GHC == 9.8.4
    GHC == 9.10.1
    GHC == 9.10.2
    GHC == 9.10.3
    GHC == 9.12.2
    GHC == 9.12.4
    GHC == 9.14.1

description: 
    Declare configuration variables in a '.cfv' file and parse them.

    An example of the contents of a CFV file is:

    > -- a comment
    > greeting = 'hello';                   -- single-quoted string
    > empty    = "";                        -- double-quoted string
    > now      = `date +%s`;                -- run shell command
    > home'    = `echo "$HOME"`;            -- access to your shells PATH
    > secret api_key = "password/token/key" -- a secret variable (public is default)

    For more information on the syntax of variable declarations see "Configuration.Cfv".

common extensions
    default-language: GHC2021
    default-extensions:
        InstanceSigs
        OverloadedStrings

common ghc-options
    ghc-options: -Wall -Widentities

common rts-options
    ghc-options: -rtsopts -threaded "-with-rtsopts=-N"

library
    import:           extensions
    import:           ghc-options
    exposed-modules:  
        Configuration.Cfv
        Configuration.Cfv.AST
        Configuration.Cfv.Parser
        Configuration.Cfv.Shell        
    build-depends:    
        base       >= 4.7    && < 5
       ,bytestring >= 0.12.2 && < 0.13
       ,containers >= 0.8    && < 0.9
       ,filepath   >= 1.5.4  && < 1.6
       ,megaparsec >= 9.8.3  && < 9.9
       ,mtl        >= 2.3.1  && < 2.4
       ,process    >= 1.6.26 && < 1.7
       ,text       >= 2.1.3  && < 2.2
    hs-source-dirs:   src
    default-language: Haskell2010

executable cfv
    import:           extensions
    import:           ghc-options
    import:           rts-options
    main-is:          Main.hs
    build-depends:
         base >= 4.7 && < 5
        ,cfv
    hs-source-dirs:   app
    default-language: Haskell2010

test-suite cfv-test
    import:           extensions
    import:           ghc-options
    import:           rts-options
    default-language: Haskell2010
    other-modules:
        CfvSpec
    type:             exitcode-stdio-1.0
    hs-source-dirs:   test
    main-is:          Spec.hs
    build-tool-depends: 
        hspec-discover:hspec-discover
    build-depends:
         base  >= 4.7     && < 5
        ,hspec >= 2.11.18 && < 2.12
        ,text  >= 2.1.3   && < 2.2
        ,cfv