Cleanup cabal file, use common stanza
@@ -25,41 +25,55 @@ source-repository head
type: git
location: https://github.com/hslua/hslua-aeson
-library
- hs-source-dirs: src
- exposed-modules: HsLua.Aeson
- build-depends: base >= 4.7 && < 5
+common common-options
+ default-language: Haskell2010
+ build-depends: base >= 4.8 && < 5
, aeson >= 0.11 && < 1.6
+ , bytestring >= 0.10.2 && < 0.12
+ , containers >= 0.5.9 && < 0.7
, hashable >= 1.2 && < 1.5
, hslua-core >= 2.0 && < 2.1
, hslua-marshalling >= 2.0 && < 2.1
+ , mtl >= 2.2 && < 2.3
, scientific >= 0.3 && < 0.4
- , text >= 1.1.1.0 && < 1.3
, unordered-containers >= 0.2 && < 0.3
+ , text >= 1.0 && < 1.3
, vector >= 0.7
+ default-extensions: BangPatterns
+ , LambdaCase
+ , OverloadedStrings
+ , TypeApplications
+ ghc-options: -Wall
+ -Wincomplete-record-updates
+ -Wnoncanonical-monad-instances
+ -Wredundant-constraints
+ if impl(ghc >= 8.2)
+ ghc-options: -Wcpp-undef
+ -Werror=missing-home-modules
+ if impl(ghc >= 8.4)
+ ghc-options: -Widentities
+ -Wincomplete-uni-patterns
+ -Wpartial-fields
+ -fhide-source-paths
+
+library
+ import: common-options
+ exposed-modules: HsLua.Aeson
+ hs-source-dirs: src
+ build-depends: base >= 4.7 && < 5
default-language: Haskell2010
- ghc-options: -Wall -fno-warn-unused-do-bind
test-suite hslua-aeson-test
+ import: common-options
type: exitcode-stdio-1.0
- hs-source-dirs: test
main-is: AesonSpec.hs
- build-depends: base
- , aeson
- , bytestring >= 0.10.2 && < 0.12
- , HUnit
+ hs-source-dirs: test
+ build-depends: hslua-aeson
, QuickCheck
- , quickcheck-instances
- , hashable
- , hslua
- , hslua-aeson
, ieee754
- , scientific
- , text
+ , quickcheck-instances
, tasty >= 0.11
, tasty-hunit >= 0.9
, tasty-quickcheck >= 0.8
- , unordered-containers
- , vector
- ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
+ ghc-options: -threaded
default-language: Haskell2010
