cabal-version:   3.0
name:            dotparse
version:         0.0.3
synopsis:        dot language parsing and printing.
description:     This package provides parsing and printing of the dot language.

  == Usage

  >>> :set -XOverloadedLabels
  >>> :set -XOverloadedStrings
  >>> import DotParse
  >>> import Chart
  >>> import DotParse.Examples (exInt)
  >>> ex <- processGraph exInt
  >>> writeChartOptions "other/exga.svg" (graphToChartWith defaultChartConfig ex)

  ![usage example](docs/other/exga.svg)


category:        project
author:          Tony Day
maintainer:      tonyday567@gmail.com
copyright:       Tony Day (c) 2022
license:         BSD-3-Clause
homepage:        https://github.com/tonyday567/dotparse#readme
bug-reports:     https://github.com/tonyday567/dotparse/issues
build-type:      Simple
extra-doc-files: other/*.svg
                 ChangeLog.md
                 readme.org

source-repository head
  type:     git
  location: https://github.com/tonyday567/dotparse

common ghc2021-stanza
  if impl(ghc >=9.2)
    default-language:
      GHC2021
  if impl(ghc <9.2)
    default-language:
      Haskell2010
    default-extensions:
      BangPatterns
      BinaryLiterals
      ConstrainedClassMethods
      ConstraintKinds
      DeriveDataTypeable
      DeriveFoldable
      DeriveFunctor
      DeriveGeneric
      DeriveLift
      DeriveTraversable
      DoAndIfThenElse
      EmptyCase
      EmptyDataDecls
      EmptyDataDeriving
      ExistentialQuantification
      ExplicitForAll
      FlexibleContexts
      FlexibleInstances
      ForeignFunctionInterface
      GADTSyntax
      GeneralisedNewtypeDeriving
      HexFloatLiterals
      ImplicitPrelude
      InstanceSigs
      KindSignatures
      MonomorphismRestriction
      MultiParamTypeClasses
      NamedFieldPuns
      NamedWildCards
      NumericUnderscores
      PatternGuards
      PolyKinds
      PostfixOperators
      RankNTypes
      RelaxedPolyRec
      ScopedTypeVariables
      StandaloneDeriving
      StarIsType
      TraditionalRecordSyntax
      TupleSections
      TypeApplications
      TypeOperators
      TypeSynonymInstances
  if impl(ghc <9.2) && impl(ghc >=8.10)
    default-extensions:
      ImportQualifiedPost
      StandaloneKindSignatures

common ghc-options-stanza
  ghc-options:
    -Wall
    -Wcompat
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns
    -Wredundant-constraints
    -Widentities
    -Wpartial-fields

library
  import: ghc2021-stanza
  import: ghc-options-stanza
  hs-source-dirs:     src
  build-depends:
    , algebraic-graphs    >=0.6 && <0.8
    , base                >=4.7 && <5
    , bytestring          >=0.11.3 && <0.13
    , chart-svg           >=0.3 && < 0.5
    , containers          ^>=0.6
    , flatparse           >=0.3.2 && <0.6
    , numhask-space       >=0.10 && <0.12
    , optics-core         ^>=0.4
    , process-extras      ^>=0.7.4
    , string-interpolate ^>=0.3
    , template-haskell    >=2.16 && < 2.21
    , text                >=1.2 && <2.1
    , these               >=1.1.1 && < 1.3

  exposed-modules:
    DotParse
    DotParse.Examples
    DotParse.Examples.NumHask
    DotParse.FlatParse
    DotParse.FlatParse.TH
    DotParse.Types