packages feed

ptera-th-0.6.1.0: ptera-th.cabal

cabal-version:       3.0
build-type:          Custom

name:                ptera-th
version:             0.6.1.0
license:             Apache-2.0 OR MPL-2.0
license-file:        LICENSE
copyright:           (c) 2021 Mizunashi Mana
author:              Mizunashi Mana
maintainer:          mizunashi-mana@noreply.git

category:            Parsing
homepage:            https://github.com/mizunashi-mana/ptera
bug-reports:         https://github.com/mizunashi-mana/ptera/issues
synopsis:            A parser generator
description:
    Ptera is haskell libraries and toolchains for generating parser.

extra-source-files:
    README.md
    CHANGELOG.md

source-repository head
  type:     git
  location: https://github.com/mizunashi-mana/ptera.git

flag develop
    default:     False
    manual:      True
    description: Turn on some options for development

common general
    default-language:
        Haskell2010
    default-extensions:
        NoImplicitPrelude
        BangPatterns
        BinaryLiterals
        BlockArguments
        ConstraintKinds
        DataKinds
        DefaultSignatures
        DeriveFoldable
        DeriveFunctor
        DeriveGeneric
        DeriveLift
        DeriveTraversable
        DerivingVia
        DuplicateRecordFields
        EmptyCase
        FlexibleContexts
        FlexibleInstances
        FunctionalDependencies
        GADTs
        InstanceSigs
        LambdaCase
        MagicHash
        MultiParamTypeClasses
        MultiWayIf
        NamedFieldPuns
        NegativeLiterals
        NumericUnderscores
        OverloadedLabels
        PackageImports
        PatternSynonyms
        PolyKinds
        RankNTypes
        ScopedTypeVariables
        StandaloneDeriving
        StandaloneKindSignatures
        Strict
        TypeApplications
        TypeFamilies
        TypeOperators
        UnboxedSums
        UnboxedTuples

    if flag(develop)
        ghc-options:
            -Wall
            -Wcompat
            -Wincomplete-uni-patterns
            -Wmonomorphism-restriction
            -Wpartial-fields

            -fprint-explicit-foralls
            -frefinement-level-hole-fits=1

            -dcore-lint

    build-depends:
        base                 >= 4.14.0 && < 5,

        -- project depends
        ptera-core              >= 0.1.0 && < 0.2,
        ptera                   >= 0.3.0 && < 0.4,
        ghc-prim                >= 0.6.1 && < 0.7,
        containers              >= 0.6.0 && < 0.7,
        unordered-containers    >= 0.2.0 && < 0.3,
        array                   >= 0.5.4 && < 0.6,
        membership              >= 0.0.1 && < 0.1,
        enummapset-th           >= 0.6.0 && < 0.7,
        template-haskell        >= 2.16.0 && < 2.17,

    autogen-modules:
        Paths_ptera_th
    other-modules:
        Paths_ptera_th

custom-setup
    setup-depends:
        base,
        Cabal,
        cabal-doctest,

library
    import:
        general,
    hs-source-dirs:
        src
    exposed-modules:
        Language.Parser.Ptera.TH
        Language.Parser.Ptera.TH.ParserLib

        Language.Parser.Ptera.TH.Data.Bits.MaxBit
        Language.Parser.Ptera.TH.Class.LiftType

        Language.Parser.Ptera.TH.Syntax
        Language.Parser.Ptera.TH.Util
        Language.Parser.Ptera.TH.Pipeline.SRB2ParserDec
        Language.Parser.Ptera.TH.Pipeline.Grammar2ParserDec

test-suite doctest
    import:
        general,
    type:
        exitcode-stdio-1.0
    hs-source-dirs:
        test/doctest
    main-is:
        Doctest.hs
    build-depends:
        doctest,
        QuickCheck,
    autogen-modules:
        Build_doctests
    other-modules:
        Build_doctests

test-suite spec
    import:
        general,
    type:
        exitcode-stdio-1.0
    hs-source-dirs:
        test/spec
    main-is:
        HSpecDriver.hs
    ghc-options:
        -Wno-missing-home-modules
    build-tool-depends:
        hspec-discover:hspec-discover,
    build-depends:
        ptera-th,

        hspec,
        QuickCheck,