cabal-version:   3.0
name:            bbcode
version:         0.1.0.0
synopsis:        Library for parsing, constructing, and printing BBCode
description:
  This is a set of utilities for: Parsing BBCode into AST(providing
  related types), Building BBCode AST with simple DSL based on
  Semigroup and functions.
  Currently this library can only be used with a very specific BBCode dialect
  used on a resource I won't name.

homepage:        https://gitlab.com/repetitivesin/BBCode
license:         GPL-3.0-or-later
license-file:    LICENSE
author:          Repetitive
maintainer:      serendipitousdog@protonmail.com
category:        text
build-type:      Simple
extra-doc-files: CHANGELOG.md

source-repository head
  type:     git
  location: https://gitlab.com/repetitivesin/BBCode.git

common c
  build-depends:      base ^>=4.16.4.0
  ghc-options:        -Wall
  default-extensions:
    ApplicativeDo
    LambdaCase
    OverloadedStrings
    RecordWildCards
    ViewPatterns

  build-depends:
    , base          ^>=4.16.4.0
    , containers    >=0.6.5     && <0.7
    , lens          >=5.2.2     && <5.3
    , megaparsec    >=9.4.1     && <9.5
    , mtl           >=2.2.2     && <2.3
    , text          >=1.2.5     && <1.3
    , transformers  >=0.5.6     && <0.6

library
  import:           c
  exposed-modules:
    Text.BBCode
    Text.BBCode.Lens
    Text.BBCode.Parser

  other-modules:
    Text.BBCode.Internal.Builder
    Text.BBCode.Internal.Helper
    Text.BBCode.Internal.Parser
    Text.BBCode.Internal.Pretty
    Text.BBCode.Internal.Types

  hs-source-dirs:   lib
  default-language: GHC2021

test-suite BBCode-test
  import:           c
  default-language: GHC2021
  type:             exitcode-stdio-1.0
  hs-source-dirs:   test
  main-is:          Main.hs
  build-depends:    bbcode