packages feed

caml-parser-0.1.0.0: caml-parser.cabal

cabal-version:      3.0
name:               caml-parser
version:            0.1.0.0
synopsis:           An extensible parser-combinator library for Caml-Light
description:
  A Megaparsec-based parser combinator library for the Caml-Light language,
  featuring a plugin architecture for embedding domain-specific languages.
  .
  The core parser covers the full Caml-Light grammar — expressions, patterns,
  types, declarations, and toplevel phrases — while the plugin system allows
  EDSL authors to register new keywords, inject grammar productions, and
  extend the AST without modifying the core source code.
  .
  An included example plugin implements the MLQE quantum programming
  extension, validating @qdef@ declarations for quantum gates and channels.
license:            MIT
license-file:       LICENSE
copyright:          (c) 2025 overshiki
author:             overshiki
maintainer:         le.niu@hotmail.com
category:           Parsing, Language
build-type:         Simple
extra-doc-files:    README.md
                    CHANGELOG.md
homepage:           https://github.com/overshiki/caml-parser
bug-reports:        https://github.com/overshiki/caml-parser/issues
tested-with:        GHC == 9.6.7

source-repository head
  type:     git
  location: https://github.com/overshiki/caml-parser.git

library
  exposed-modules:
    CamlParser.Lexer.Token
    CamlParser.Lexer.Lexer
    CamlParser.Syntax.Location
    CamlParser.Syntax.Constant
    CamlParser.Syntax.Type
    CamlParser.Syntax.Pattern
    CamlParser.Syntax.Expr
    CamlParser.Syntax.Decl
    CamlParser.Parser.Combinators
    CamlParser.Parser.Expr
    CamlParser.Parser.Pattern
    CamlParser.Parser.Type
    CamlParser.Parser.Toplevel
    CamlParser.Parser.Assembly
    CamlParser.Plugin.Interface
    CamlParser.Plugin.Registry
    MLQE.Syntax
    MLQE.Plugin
  hs-source-dirs:     src
  build-depends:
      base              >= 4.18    && < 5
    , containers        >= 0.6     && < 0.8
    , megaparsec        >= 9.2     && < 10
    , mtl               >= 2.2     && < 2.4
  default-language:   Haskell2010
  ghc-options:        -Wall -Wcompat

test-suite caml-parser-test
  type:               exitcode-stdio-1.0
  main-is:            Main.hs
  hs-source-dirs:     test
  build-depends:
      base              >= 4.18    && < 5
    , caml-parser
    , containers        >= 0.6     && < 0.8
    , megaparsec        >= 9.2     && < 10
    , tasty             >= 1.4     && < 1.6
    , tasty-hunit       >= 0.10    && < 0.11
  default-language:   Haskell2010
  ghc-options:        -Wall -threaded -rtsopts