cabal-version: 2.2

name:                 brittany
version:              92.1.0.0
synopsis:             Haskell source code formatter
description:
  See <https://github.com/lspitzner/brittany/blob/master/README.md the README>.
  .
  If you are interested in the implementation, have a look at <https://github.com/lspitzner/brittany/blob/master/doc/implementation/theory.md this document>;
  .
  The implementation is documented in more detail <https://github.com/lspitzner/brittany/blob/master/doc/implementation/index.md here>.
license:              AGPL-3.0-only
license-file:         LICENSE
author:               Lennart Spitzner
maintainer:           Lennart Spitzner <hexagoxel@hexagoxel.de>
copyright:            Copyright (C) 2016-2019 Lennart Spitzner
                      Copyright (C) 2019 PRODA LTD
category:             Language
build-type:           Simple
homepage:             https://github.com/lspitzner/brittany/
bug-reports:          https://github.com/lspitzner/brittany/issues
extra-doc-files:
  ChangeLog.md
  README.md
  doc/implementation/*.md
extra-source-files:
  data/*.blt

source-repository head
  type: git
  location: https://github.com/lspitzner/brittany.git

flag pedantic
  default: False
  description: Enables @-Werror@, which turns warnings into errors.
  manual: True

common library
  build-depends:
    , aeson ^>= 2.0.1
    , base >= 4.15.0 && < 4.17
    , butcher ^>= 2.0.0
    , bytestring >= 0.10.12 && < 0.12
    , cmdargs ^>= 0.10.21
    , containers ^>= 0.6.4
    , czipwith ^>= 1.0.1
    , data-tree-print ^>= 0.1.0
    , deepseq ^>= 1.4.5
    , directory ^>= 1.3.6
    , extra ^>= 1.7.10
    , filepath ^>= 1.4.2
    , ghc >= 9.0.1 && < 9.3
    , ghc-boot >= 9.0.1 && < 9.3
    , ghc-boot-th >= 9.0.1 && < 9.3
    , ghc-exactprint >= 0.6.4 && < 1.6
    , monad-memo ^>= 0.5.3
    , mtl ^>= 2.2.2
    , multistate ^>= 0.8.0
    , pretty ^>= 1.1.3
    , random ^>= 1.2.1
    , safe ^>= 0.3.19
    , semigroups >= 0.19.2 && < 0.21
    , strict ^>= 0.4.0
    , syb ^>= 0.7.2
    , text ^>= 1.2.5
    , transformers ^>= 0.5.6
    , uniplate ^>= 1.6.13
    , yaml ^>= 0.11.7
  default-language: Haskell2010
  ghc-options:
    -Weverything
    -Wno-all-missed-specialisations
    -Wno-missing-deriving-strategies
    -Wno-missing-export-lists
    -Wno-missing-import-lists
    -Wno-missing-local-signatures
    -Wno-missing-safe-haskell-mode
    -Wno-monomorphism-restriction
    -Wno-prepositive-qualified-module
    -Wno-safe
    -Wno-unsafe
    -Wno-missing-kind-signatures
    -Wunused-imports
    -fhide-source-paths

  if flag(pedantic)
    ghc-options: -Werror

  default-extensions: {
    FlexibleContexts
    FlexibleInstances
    ScopedTypeVariables
    MonadComprehensions
    LambdaCase
    MultiWayIf
    KindSignatures
    MultiParamTypeClasses
    TypeApplications
    RankNTypes
    GADTs
    BangPatterns
  }

common executable
  import: library

  build-depends: brittany
  ghc-options:
    -rtsopts
    -threaded
    -Wno-implicit-prelude
    -Wno-unused-packages
    -fhide-source-paths

library
  import: library

  autogen-modules: Paths_brittany
  hs-source-dirs: source/library
  exposed-modules:
    Language.Haskell.Brittany.Main
    Language.Haskell.Brittany
    Language.Haskell.Brittany.Internal
    Language.Haskell.Brittany.Internal.Config.Config
    Language.Haskell.Brittany.Internal.Config.InlineParsing
    Language.Haskell.Brittany.Internal.Config.Types
    Language.Haskell.Brittany.Internal.Config.Types.Instances1
    Language.Haskell.Brittany.Internal.Config.Types.Instances2
    Language.Haskell.Brittany.Internal.ParseExact
    Language.Haskell.Brittany.Internal.SplitExactModule
    Language.Haskell.Brittany.Internal.ToBriDoc.Comment
    Language.Haskell.Brittany.Internal.ToBriDoc.DataDecl
    Language.Haskell.Brittany.Internal.ToBriDoc.Decl
    Language.Haskell.Brittany.Internal.ToBriDoc.Expr
    Language.Haskell.Brittany.Internal.ToBriDoc.OpTree
    Language.Haskell.Brittany.Internal.ToBriDoc.IE
    Language.Haskell.Brittany.Internal.ToBriDoc.Import
    Language.Haskell.Brittany.Internal.ToBriDoc.Module
    Language.Haskell.Brittany.Internal.ToBriDoc.Pattern
    Language.Haskell.Brittany.Internal.ToBriDoc.Stmt
    Language.Haskell.Brittany.Internal.ToBriDoc.Type
    Language.Haskell.Brittany.Internal.ToBriDoc
    Language.Haskell.Brittany.Internal.Components.BriDoc
    Language.Haskell.Brittany.Internal.Components.Obfuscation
    Language.Haskell.Brittany.Internal.Components.OpTree
    Language.Haskell.Brittany.Internal.ToBriDocTools
    Language.Haskell.Brittany.Internal.WriteBriDoc
    Language.Haskell.Brittany.Internal.PerModule
    Language.Haskell.Brittany.Internal.PerDecl
    Language.Haskell.Brittany.Internal.Prelude
    Language.Haskell.Brittany.Internal.Transformations.T1_Alt
    Language.Haskell.Brittany.Internal.Transformations.T2_Floating
    Language.Haskell.Brittany.Internal.Transformations.T3_Par
    Language.Haskell.Brittany.Internal.Transformations.T4_Columns
    Language.Haskell.Brittany.Internal.Transformations.T5_Indent
    Language.Haskell.Brittany.Internal.WriteBriDoc.AlignmentAlgo
    Language.Haskell.Brittany.Internal.WriteBriDoc.Operators
    Language.Haskell.Brittany.Internal.WriteBriDoc.Types
    Language.Haskell.Brittany.Internal.Types
    Language.Haskell.Brittany.Internal.Utils
    Paths_brittany

executable brittany
  import: executable

  hs-source-dirs: source/executable
  main-is: Main.hs

test-suite brittany-test-suite
  import: executable

  build-depends:
    , hspec >= 2.8.3 && < 2.10
    , HUnit >= 1.6.2 && < 1.7
    , ansi-terminal >= 0.11.4 && < 0.12
    , parsec ^>= 3.1.14
    , these ^>= 1.1
  hs-source-dirs: source/test-suite
  main-is: Main.hs
  type: exitcode-stdio-1.0
