cabal-version:      2.2
name:               cabal-fmt
version:            0.1.5.1
synopsis:           Format .cabal files
category:           Development
description:
  Format @.cabal@ files preserving the original field ordering, and comments.
  .
  Tuned for Oleg's preference, but has some knobs still.

license:            GPL-3.0-or-later AND BSD-3-Clause
license-file:       LICENSE
author:             Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer:         Oleg Grenrus <oleg.grenrus@iki.fi>
tested-with:        GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2
extra-source-files:
  Changelog.md
  fixtures/*.cabal
  fixtures/*.format

source-repository head
  type:     git
  location: https://github.com/phadej/cabal-fmt.git

library cabal-fmt-internal
  default-language: Haskell2010
  hs-source-dirs:   src

  -- GHC boot libraries
  build-depends:
    , base        ^>=4.11.1.0 || ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0
    , bytestring  ^>=0.10.8.2
    , Cabal       ^>=3.2.0.0
    , containers  ^>=0.5.11.0 || ^>=0.6.0.1
    , directory   ^>=1.3.1.5
    , filepath    ^>=1.4.2
    , mtl         ^>=2.2.2
    , parsec      ^>=3.1.13.0
    , pretty      ^>=1.1.3.6

  -- cabal-fmt: expand src
  exposed-modules:
    CabalFmt
    CabalFmt.Comments
    CabalFmt.Error
    CabalFmt.Fields
    CabalFmt.Fields.BuildDepends
    CabalFmt.Fields.Extensions
    CabalFmt.Fields.Modules
    CabalFmt.Fields.SourceFiles
    CabalFmt.Fields.TestedWith
    CabalFmt.Glob
    CabalFmt.Monad
    CabalFmt.Options
    CabalFmt.Parser
    CabalFmt.Pragma
    CabalFmt.Prelude
    CabalFmt.Refactoring
    CabalFmt.Refactoring.ExpandExposedModules
    CabalFmt.Refactoring.Fragments
    CabalFmt.Refactoring.GlobFiles
    CabalFmt.Refactoring.Type

  other-extensions:
    DeriveFunctor
    DerivingStrategies
    ExistentialQuantification
    FlexibleContexts
    GeneralizedNewtypeDeriving
    OverloadedStrings
    RankNTypes
    ScopedTypeVariables

executable cabal-fmt
  default-language: Haskell2010
  hs-source-dirs:   cli
  main-is:          Main.hs
  other-modules:    Paths_cabal_fmt
  autogen-modules:  Paths_cabal_fmt

  -- dependencies in library
  build-depends:
    , base
    , bytestring
    , cabal-fmt-internal
    , directory
    , filepath

  -- extra dependencies
  build-depends:    optparse-applicative >=0.14.3.0 && <0.17

test-suite golden
  type:             exitcode-stdio-1.0
  default-language: Haskell2010
  hs-source-dirs:   tests
  main-is:          Golden.hs

  -- dependencies in library
  build-depends:
    , base
    , bytestring
    , Cabal
    , cabal-fmt-internal
    , containers

  -- test dependencies
  build-depends:
    , filepath
    , process
    , tasty
    , tasty-golden

-- end file comment