Improve .cabal files

- Add build-tool-depends, so new-build can use hspec-discover
- Add mtl bounds in tutorial (and dependency on mtl-compact)
- Add extra-source-files to tutorial, so it's buildable from sdist
This commit is contained in:
Oleg Grenrus 2017-10-22 14:13:18 +03:00
parent c3e4abd892
commit 85929abcc8
6 changed files with 17 additions and 1 deletions

View File

@ -13,6 +13,9 @@ tested-with:
GHC==7.10.3 GHC==7.10.3
GHC==8.0.2 GHC==8.0.2
GHC==8.2.1 GHC==8.2.1
extra-source-files:
static/index.html
static/ui.js
library library
exposed-modules: ApiType exposed-modules: ApiType
@ -42,7 +45,8 @@ library
, string-conversions , string-conversions
, bytestring , bytestring
, attoparsec , attoparsec
, mtl , mtl >=2.1 && <2.3
, mtl-compat
, random , random
, js-jquery , js-jquery
, wai , wai
@ -61,6 +65,8 @@ test-suite spec
hs-source-dirs: test hs-source-dirs: test
main-is: Spec.hs main-is: Spec.hs
other-modules: JavascriptSpec other-modules: JavascriptSpec
build-tool-depends:
hspec-discover:hspec-discover
build-depends: base == 4.* build-depends: base == 4.*
, tutorial , tutorial
, hspec , hspec

View File

@ -81,6 +81,8 @@ test-suite spec
default-language: Haskell2010 default-language: Haskell2010
hs-source-dirs: test hs-source-dirs: test
main-is: Spec.hs main-is: Spec.hs
build-tool-depends:
hspec-discover:hspec-discover
other-modules: other-modules:
Servant.ClientSpec Servant.ClientSpec
, Servant.Common.BaseUrlSpec , Servant.Common.BaseUrlSpec

View File

@ -79,6 +79,8 @@ test-suite spec
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: Spec.hs main-is: Spec.hs
other-modules: Servant.DocsSpec other-modules: Servant.DocsSpec
build-tool-depends:
hspec-discover:hspec-discover
hs-source-dirs: test hs-source-dirs: test
ghc-options: -Wall ghc-options: -Wall
build-depends: build-depends:

View File

@ -71,6 +71,8 @@ test-suite spec
include-dirs: include include-dirs: include
main-is: Spec.hs main-is: Spec.hs
other-modules: Servant.ForeignSpec other-modules: Servant.ForeignSpec
build-tool-depends:
hspec-discover:hspec-discover
build-depends: base build-depends: base
, hspec >= 2.1.8 , hspec >= 2.1.8
, servant , servant

View File

@ -125,6 +125,8 @@ test-suite spec
Servant.Server.UsingContextSpec.TestCombinators Servant.Server.UsingContextSpec.TestCombinators
Servant.ServerSpec Servant.ServerSpec
Servant.Utils.StaticFilesSpec Servant.Utils.StaticFilesSpec
build-tool-depends:
hspec-discover:hspec-discover
build-depends: build-depends:
base == 4.* base == 4.*
, base-compat , base-compat

View File

@ -122,6 +122,8 @@ test-suite spec
Servant.API.ResponseHeadersSpec Servant.API.ResponseHeadersSpec
Servant.Utils.LinksSpec Servant.Utils.LinksSpec
Servant.Utils.EnterSpec Servant.Utils.EnterSpec
build-tool-depends:
hspec-discover:hspec-discover
build-depends: build-depends:
base == 4.* base == 4.*
, base-compat , base-compat