packages feed

typed-peg-0.2.0.0: typed-peg.cabal

cabal-version:      3.0
name:               typed-peg
version:            0.2.0.0
synopsis:           Type-safe PEG parser combinators
description:
  A library for building Parsing Expression Grammars parsers
  with compile-time safety guarantees. Grammar non-terminals are
  indexed by their nullability and FIRST sets at the type level,
  making left-recursive grammars a type error.
  .
  A quasi-quoter (@PEG.QQ@) allows writing grammars in a concrete
  DSL syntax. Indentation-sensitive parsing is supported natively
  via @PEG.Indent@.
  .
  Parsers run over any @PEG.Stream@ instance: @String@, strict and
  lazy @Text@, and strict and lazy @ByteString@. A character class
  produces a chunk of the input stream, so matching @[a-z]+@ against
  a @Text@ yields a slice rather than a @[Char]@.

license:            BSD-3-Clause
license-file:       LICENSE
author:             Rodrigo Ribeiro
maintainer:         rodrigo.ribeiro@ufop.edu.br
category:           Parsing
homepage:           https://github.com/rodrigogribeiro/typed-peg
bug-reports:        https://github.com/rodrigogribeiro/typed-peg/issues
build-type:         Simple
extra-source-files: README.md
extra-doc-files:
  CHANGELOG.md
  peg-patterns.md
tested-with:        GHC == 9.10.3

source-repository head
  type:     git
  location: https://github.com/rodrigogribeiro/typed-peg

common common-opts
  ghc-options:
    -Wall
    -Wno-partial-type-signatures
    -Wno-unrecognised-pragmas
  default-language:   Haskell2010
  default-extensions:
    DataKinds
    GADTs
    TypeFamilies
    TypeOperators
    KindSignatures
    ScopedTypeVariables
    FlexibleContexts
    FlexibleInstances
    UndecidableInstances
    RankNTypes
    TypeApplications

library
  import:          common-opts
  hs-source-dirs:  src
  exposed-modules:
    PEG
    PEG.CharSet
    PEG.Grammar
    PEG.Indent
    PEG.Member
    PEG.Parse
    PEG.QQ
    PEG.QQ.HsExp
    PEG.Semantics.Simple
    PEG.Stream
    PEG.Syntax
    PEG.TyLevel
    PEG.Type
  build-depends:
      base             >= 4.18 && < 5
    , bytestring       >= 0.11 && < 0.13
    , template-haskell >= 2.19 && < 2.24
    , text             >= 2.0  && < 2.2

test-suite typed-peg-examples
  import:          common-opts
  type:            exitcode-stdio-1.0
  hs-source-dirs:  examples
  main-is:         Main.hs
  other-modules:   Arith, Layout, Compat, Patterns
  build-depends:
      base
    , bytestring
    , text
    , typed-peg

benchmark typed-peg-bench
  import:          common-opts
  type:            exitcode-stdio-1.0
  hs-source-dirs:  bench
  main-is:         Main.hs
  other-modules:
    Bench.Inputs
    Bench.Peg
    Bench.Mega
  ghc-options:     -O2 -rtsopts "-with-rtsopts=-T"
  build-depends:
      base
    , typed-peg
    , bytestring
    , criterion    >= 1.6 && < 1.7
    , megaparsec   >= 9.5 && < 10
    , deepseq
    , text