Format Cabal files with ‘cabal format’

This commit is contained in:
Mark Karpov 2020-04-23 20:15:41 +02:00
parent 996945a056
commit e8c276572e
No known key found for this signature in database
GPG Key ID: 8564658B2889FF7C
4 changed files with 276 additions and 235 deletions

View File

@ -7,6 +7,12 @@ cache:
- ~/.cabal/packages
- ~/.cabal/store
env:
global:
# To avoid re-compilation it is important to use exactly the same
# configuration for all steps.
- CABAL_CONFIG="--enable-tests --enable-benchmarks --flags=dev"
matrix:
include:
- env: CABALVER=3.0 GHCVER=8.6.5
@ -25,12 +31,15 @@ install:
- travis_retry cabal new-update
script:
- cabal new-build all --enable-tests --enable-benchmarks --flags=dev
- cabal new-test all --enable-tests --enable-benchmarks --flags=dev
- cabal new-haddock megaparsec
- cabal new-haddock megaparsec-tests
- cabal format
- pushd megaparsec-tests && cabal format && popd
- git diff --exit-code --color=always
- cabal new-build all $CABAL_CONFIG
- cabal new-test all $CABAL_CONFIG
- cabal new-haddock megaparsec $CABAL_CONFIG
- cabal new-haddock megaparsec-tests $CABAL_CONFIG
- cabal new-sdist
- cd megaparsec-tests && cabal new-sdist
- pushd megaparsec-tests && cabal new-sdist && popd
notifications:
email: false

View File

@ -1,78 +1,85 @@
name: megaparsec-tests
version: 8.0.0
cabal-version: 1.18
tested-with: GHC==8.6.5, GHC==8.8.1, GHC==8.10.1
license: BSD2
license-file: LICENSE.md
author: Megaparsec contributors
maintainer: Mark Karpov <markkarpov92@gmail.com>
homepage: https://github.com/mrkkrp/megaparsec
bug-reports: https://github.com/mrkkrp/megaparsec/issues
category: Parsing
synopsis: Test utilities and the test suite of Megaparsec
build-type: Simple
description: Test utilities and the test suite of Megaparsec.
extra-doc-files: README.md
cabal-version: 1.18
name: megaparsec-tests
version: 8.0.0
license: BSD2
license-file: LICENSE.md
maintainer: Mark Karpov <markkarpov92@gmail.com>
author: Megaparsec contributors
tested-with: ghc ==8.6.5 ghc ==8.8.1 ghc ==8.10.1
homepage: https://github.com/mrkkrp/megaparsec
bug-reports: https://github.com/mrkkrp/megaparsec/issues
synopsis: Test utilities and the test suite of Megaparsec
description: Test utilities and the test suite of Megaparsec.
category: Parsing
build-type: Simple
extra-doc-files: README.md
flag dev
description: Turn on development settings.
manual: True
default: False
description: Turn on development settings.
default: False
manual: True
library
hs-source-dirs: src
build-depends: QuickCheck >= 2.10 && < 2.15
, base >= 4.12 && < 5.0
, bytestring >= 0.2 && < 0.11
, containers >= 0.5 && < 0.7
, hspec >= 2.0 && < 3.0
, hspec-expectations >= 0.8 && < 0.9
, hspec-megaparsec >= 2.0 && < 3.0
, megaparsec == 8.0.0
, mtl >= 2.2.2 && < 3.0
, text >= 0.2 && < 1.3
, transformers >= 0.4 && < 0.6
exposed-modules: Test.Hspec.Megaparsec.AdHoc
if flag(dev)
ghc-options: -Wall -Werror -Wcompat
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wnoncanonical-monad-instances
else
ghc-options: -O2 -Wall
default-language: Haskell2010
exposed-modules: Test.Hspec.Megaparsec.AdHoc
hs-source-dirs: src
default-language: Haskell2010
build-depends:
QuickCheck >=2.10 && <2.15,
base >=4.12 && <5.0,
bytestring >=0.2 && <0.11,
containers >=0.5 && <0.7,
hspec >=2.0 && <3.0,
hspec-expectations >=0.8 && <0.9,
hspec-megaparsec >=2.0 && <3.0,
megaparsec ==8.0.0,
mtl >=2.2.2 && <3.0,
text >=0.2 && <1.3,
transformers >=0.4 && <0.6
if flag(dev)
ghc-options:
-Wall -Werror -Wcompat -Wincomplete-record-updates
-Wincomplete-uni-patterns -Wnoncanonical-monad-instances
else
ghc-options: -O2 -Wall
test-suite tests
main-is: Spec.hs
hs-source-dirs: tests
type: exitcode-stdio-1.0
if flag(dev)
ghc-options: -O0 -Wall -Werror
else
ghc-options: -O2 -Wall
other-modules: Text.Megaparsec.Byte.LexerSpec
, Text.Megaparsec.ByteSpec
, Text.Megaparsec.Char.LexerSpec
, Text.Megaparsec.CharSpec
, Text.Megaparsec.DebugSpec
, Text.Megaparsec.ErrorSpec
, Text.Megaparsec.PosSpec
, Text.Megaparsec.StreamSpec
, Text.MegaparsecSpec
build-depends: QuickCheck >= 2.10 && < 2.15
, base >= 4.12 && < 5.0
, bytestring >= 0.2 && < 0.11
, case-insensitive >= 1.2 && < 1.3
, containers >= 0.5 && < 0.7
, hspec >= 2.0 && < 3.0
, hspec-expectations >= 0.8 && < 0.9
, hspec-megaparsec >= 2.0 && < 3.0
, megaparsec == 8.0.0
, megaparsec-tests
, mtl >= 2.2.2 && < 3.0
, parser-combinators >= 1.0 && < 2.0
, scientific >= 0.3.1 && < 0.4
, text >= 0.2 && < 1.3
, transformers >= 0.4 && < 0.6
build-tools: hspec-discover >= 2.0 && < 3.0
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: Spec.hs
build-tools: hspec-discover >=2.0 && <3.0
hs-source-dirs: tests
other-modules:
Text.Megaparsec.Byte.LexerSpec
Text.Megaparsec.ByteSpec
Text.Megaparsec.Char.LexerSpec
Text.Megaparsec.CharSpec
Text.Megaparsec.DebugSpec
Text.Megaparsec.ErrorSpec
Text.Megaparsec.PosSpec
Text.Megaparsec.StreamSpec
Text.MegaparsecSpec
default-language: Haskell2010
build-depends:
QuickCheck >=2.10 && <2.15,
base >=4.12 && <5.0,
bytestring >=0.2 && <0.11,
case-insensitive >=1.2 && <1.3,
containers >=0.5 && <0.7,
hspec >=2.0 && <3.0,
hspec-expectations >=0.8 && <0.9,
hspec-megaparsec >=2.0 && <3.0,
megaparsec ==8.0.0,
megaparsec-tests -any,
mtl >=2.2.2 && <3.0,
parser-combinators >=1.0 && <2.0,
scientific >=0.3.1 && <0.4,
text >=0.2 && <1.3,
transformers >=0.4 && <0.6
if flag(dev)
ghc-options: -O0 -Wall -Werror
else
ghc-options: -O2 -Wall

View File

@ -1,102 +1,116 @@
name: megaparsec
version: 8.0.0
cabal-version: 1.18
tested-with: GHC==8.6.5, GHC==8.8.3, GHC==8.10.1
license: BSD2
license-file: LICENSE.md
author: Megaparsec contributors,
Paolo Martini <paolo@nemail.it>,
Daan Leijen <daan@microsoft.com>
cabal-version: 1.18
name: megaparsec
version: 8.0.0
license: BSD2
license-file: LICENSE.md
maintainer: Mark Karpov <markkarpov92@gmail.com>
author:
Megaparsec contributors,
Paolo Martini <paolo@nemail.it>,
Daan Leijen <daan@microsoft.com>
maintainer: Mark Karpov <markkarpov92@gmail.com>
homepage: https://github.com/mrkkrp/megaparsec
bug-reports: https://github.com/mrkkrp/megaparsec/issues
category: Parsing
synopsis: Monadic parser combinators
build-type: Simple
tested-with: ghc ==8.6.5 ghc ==8.8.3 ghc ==8.10.1
homepage: https://github.com/mrkkrp/megaparsec
bug-reports: https://github.com/mrkkrp/megaparsec/issues
synopsis: Monadic parser combinators
description:
This is an industrial-strength monadic parser combinator library.
Megaparsec is a feature-rich package that tries to find a nice balance
between speed, flexibility, and quality of parse errors.
This is an industrial-strength monadic parser combinator library.
Megaparsec is a feature-rich package that tries to find a nice balance
between speed, flexibility, and quality of parse errors.
extra-doc-files: CHANGELOG.md
, README.md
category: Parsing
build-type: Simple
extra-doc-files:
CHANGELOG.md
README.md
source-repository head
type: git
location: https://github.com/mrkkrp/megaparsec.git
type: git
location: https://github.com/mrkkrp/megaparsec.git
flag dev
description: Turn on development settings.
manual: True
default: False
description: Turn on development settings.
default: False
manual: True
library
build-depends: base >= 4.12 && < 5.0
, bytestring >= 0.2 && < 0.11
, case-insensitive >= 1.2 && < 1.3
, containers >= 0.5 && < 0.7
, deepseq >= 1.3 && < 1.5
, mtl >= 2.2.2 && < 3.0
, parser-combinators >= 1.0 && < 2.0
, scientific >= 0.3.1 && < 0.4
, text >= 0.2 && < 1.3
, transformers >= 0.4 && < 0.6
exposed-modules: Text.Megaparsec
, Text.Megaparsec.Byte
, Text.Megaparsec.Byte.Lexer
, Text.Megaparsec.Char
, Text.Megaparsec.Char.Lexer
, Text.Megaparsec.Debug
, Text.Megaparsec.Error
, Text.Megaparsec.Error.Builder
, Text.Megaparsec.Internal
, Text.Megaparsec.Pos
, Text.Megaparsec.Stream
other-modules: Text.Megaparsec.Class
, Text.Megaparsec.Common
, Text.Megaparsec.Lexer
, Text.Megaparsec.State
if flag(dev)
ghc-options: -O0 -Wall -Werror
else
ghc-options: -O2 -Wall
if flag(dev)
ghc-options: -Wcompat
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wnoncanonical-monad-instances
default-language: Haskell2010
exposed-modules:
Text.Megaparsec
Text.Megaparsec.Byte
Text.Megaparsec.Byte.Lexer
Text.Megaparsec.Char
Text.Megaparsec.Char.Lexer
Text.Megaparsec.Debug
Text.Megaparsec.Error
Text.Megaparsec.Error.Builder
Text.Megaparsec.Internal
Text.Megaparsec.Pos
Text.Megaparsec.Stream
other-modules:
Text.Megaparsec.Class
Text.Megaparsec.Common
Text.Megaparsec.Lexer
Text.Megaparsec.State
default-language: Haskell2010
build-depends:
base >=4.12 && <5.0,
bytestring >=0.2 && <0.11,
case-insensitive >=1.2 && <1.3,
containers >=0.5 && <0.7,
deepseq >=1.3 && <1.5,
mtl >=2.2.2 && <3.0,
parser-combinators >=1.0 && <2.0,
scientific >=0.3.1 && <0.4,
text >=0.2 && <1.3,
transformers >=0.4 && <0.6
if flag(dev)
ghc-options: -O0 -Wall -Werror
else
ghc-options: -O2 -Wall
if flag(dev)
ghc-options:
-Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns
-Wnoncanonical-monad-instances -Wno-missing-home-modules
benchmark bench-speed
main-is: Main.hs
hs-source-dirs: bench/speed
type: exitcode-stdio-1.0
build-depends: base >= 4.12 && < 5.0
, containers >= 0.5 && < 0.7
, criterion >= 0.6.2.1 && < 1.6
, deepseq >= 1.3 && < 1.5
, megaparsec
, text >= 0.2 && < 1.3
if flag(dev)
ghc-options: -O2 -Wall -Werror
else
ghc-options: -O2 -Wall
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: bench/speed
default-language: Haskell2010
build-depends:
base >=4.12 && <5.0,
containers >=0.5 && <0.7,
criterion >=0.6.2.1 && <1.6,
deepseq >=1.3 && <1.5,
megaparsec -any,
text >=0.2 && <1.3
if flag(dev)
ghc-options: -O2 -Wall -Werror
else
ghc-options: -O2 -Wall
benchmark bench-memory
main-is: Main.hs
hs-source-dirs: bench/memory
type: exitcode-stdio-1.0
build-depends: base >= 4.12 && < 5.0
, containers >= 0.5 && < 0.7
, deepseq >= 1.3 && < 1.5
, megaparsec
, text >= 0.2 && < 1.3
, weigh >= 0.0.4
if flag(dev)
ghc-options: -O2 -Wall -Werror
else
ghc-options: -O2 -Wall
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: bench/memory
default-language: Haskell2010
build-depends:
base >=4.12 && <5.0,
containers >=0.5 && <0.7,
deepseq >=1.3 && <1.5,
megaparsec -any,
text >=0.2 && <1.3,
weigh >=0.0.4
if flag(dev)
ghc-options: -O2 -Wall -Werror
else
ghc-options: -O2 -Wall

View File

@ -1,79 +1,90 @@
name: parsers-bench
version: 0.1.0
cabal-version: >= 1.18
tested-with: GHC==8.6.5
license: BSD3
author: Mark Karpov <markkarpov92@gmail.com>
maintainer: Mark Karpov <markkarpov92@gmail.com>
homepage: https://github.com/mrkkrp/megaparsec
bug-reports: https://github.com/mrkkrp/megaparsec/issues
category: Parsing, Benchmark
synopsis: Performance benchmarks: Megaparsec vs Attoparsec
build-type: Simple
description: Performance benchmarks: Megaparsec vs Attoparsec.
extra-doc-files: README.md
cabal-version: >=1.18
name: parsers-bench
version: 0.1.0
license: BSD3
maintainer: Mark Karpov <markkarpov92@gmail.com>
author: Mark Karpov <markkarpov92@gmail.com>
tested-with: ghc ==8.6.5
homepage: https://github.com/mrkkrp/megaparsec
bug-reports: https://github.com/mrkkrp/megaparsec/issues
synopsis: Performance benchmarks: Megaparsec vs Attoparsec
description: Performance benchmarks: Megaparsec vs Attoparsec.
category: Parsing, Benchmark
build-type: Simple
extra-doc-files: README.md
source-repository head
type: git
location: https://github.com/mrkkrp/parsers-bench.git
type: git
location: https://github.com/mrkkrp/parsers-bench.git
flag dev
description: Turn on development settings.
manual: True
default: False
description: Turn on development settings.
default: False
manual: True
library
build-depends: base
, attoparsec
, bytestring
, deepseq
, megaparsec
, parser-combinators
, scientific
, text
, time
, unordered-containers
, vector
exposed-modules: ParsersBench.CSV.Attoparsec
, ParsersBench.CSV.Megaparsec
, ParsersBench.Json.Attoparsec
, ParsersBench.Json.Common
, ParsersBench.Json.Megaparsec
, ParsersBench.Log.Attoparsec
, ParsersBench.Log.Common
, ParsersBench.Log.Megaparsec
if flag(dev)
ghc-options: -Wall -Werror
else
ghc-options: -O2 -Wall
default-language: Haskell2010
exposed-modules:
ParsersBench.CSV.Attoparsec
ParsersBench.CSV.Megaparsec
ParsersBench.Json.Attoparsec
ParsersBench.Json.Common
ParsersBench.Json.Megaparsec
ParsersBench.Log.Attoparsec
ParsersBench.Log.Common
ParsersBench.Log.Megaparsec
default-language: Haskell2010
build-depends:
base -any,
attoparsec -any,
bytestring -any,
deepseq -any,
megaparsec -any,
parser-combinators -any,
scientific -any,
text -any,
time -any,
unordered-containers -any,
vector -any
if flag(dev)
ghc-options: -Wall -Werror
else
ghc-options: -O2 -Wall
benchmark bench-speed
main-is: Main.hs
hs-source-dirs: bench/speed
type: exitcode-stdio-1.0
build-depends: base
, bytestring
, criterion
, deepseq
, parsers-bench
if flag(dev)
ghc-options: -O2 -Wall -Werror
else
ghc-options: -O2 -Wall
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: bench/speed
default-language: Haskell2010
build-depends:
base -any,
bytestring -any,
criterion -any,
deepseq -any,
parsers-bench -any
if flag(dev)
ghc-options: -O2 -Wall -Werror
else
ghc-options: -O2 -Wall
benchmark bench-memory
main-is: Main.hs
hs-source-dirs: bench/memory
type: exitcode-stdio-1.0
build-depends: base
, bytestring
, deepseq
, parsers-bench
, weigh
if flag(dev)
ghc-options: -O2 -Wall -Werror
else
ghc-options: -O2 -Wall
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: bench/memory
default-language: Haskell2010
build-depends:
base -any,
bytestring -any,
deepseq -any,
parsers-bench -any,
weigh -any
if flag(dev)
ghc-options: -O2 -Wall -Werror
else
ghc-options: -O2 -Wall