Skip to content

Commit

Permalink
[#29] Update resolver and add openapi dependencies
Browse files Browse the repository at this point in the history
Problem: `servant-util` does not work with GHC version 8.10.7 and doesn't
contain the necessary dependencies to implement openapi3 instances.

Solution: Update the stackage resolver for `servant-util` and add
necessary openapi3 dependencies.

Sponsored By: Scrive AB
  • Loading branch information
skykanin committed Jan 18, 2022
1 parent ee9b1aa commit 97c8f5a
Show file tree
Hide file tree
Showing 5 changed files with 221 additions and 18 deletions.
12 changes: 6 additions & 6 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"homepage": "",
"owner": "input-output-hk",
"repo": "hackage.nix",
"rev": "c4a3c64af0a33052ba93128fbdc40a2ee1335979",
"sha256": "1r74sl8r56r8360zy5kgiqcxxzx0gib314k2csjwgz71g6q5fglm",
"rev": "5eb80fb402a7101029a11c682f825b02495bab7c",
"sha256": "0bldwj2qsrmygd55hndc75nw8976d7b5kxm1bcn9r17vbfjgmpch",
"type": "tarball",
"url": "https://github.com/input-output-hk/hackage.nix/archive/c4a3c64af0a33052ba93128fbdc40a2ee1335979.tar.gz",
"url": "https://github.com/input-output-hk/hackage.nix/archive/5eb80fb402a7101029a11c682f825b02495bab7c.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"haskell.nix": {
Expand Down Expand Up @@ -41,10 +41,10 @@
"homepage": "",
"owner": "input-output-hk",
"repo": "stackage.nix",
"rev": "8d07cc6c73717ba19304e6b9231a88504d0846b4",
"sha256": "122cpdw8bsbfk6pmp8jblvkfy7g72zxm076i5c4s84rbyw33rd9f",
"rev": "308844000fafade0754e8c6641d0277768050413",
"sha256": "0g6wnz5ly4ryls1c68klpmmgzix74a4njdw3yl4i1asgavrfdapj",
"type": "tarball",
"url": "https://github.com/input-output-hk/stackage.nix/archive/8d07cc6c73717ba19304e6b9231a88504d0846b4.tar.gz",
"url": "https://github.com/input-output-hk/stackage.nix/archive/308844000fafade0754e8c6641d0277768050413.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
106 changes: 101 additions & 5 deletions servant-util-beam-pg/servant-util-beam-pg.cabal
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.33.0.
-- This file has been generated from package.yaml by hpack version 0.34.4.
--
-- see: https://github.com/sol/hpack
--
-- hash: 53c2a28480150f06472fa137b924f34b91980cd078c42d23359fa85ab8a01197
-- hash: e734c4aee1dc9136894bc3145d050404331766af259b5323976b6903fb16dd29

name: servant-util-beam-pg
version: 0.2
Expand Down Expand Up @@ -35,7 +35,39 @@ library
Paths_servant_util_beam_pg
hs-source-dirs:
src
default-extensions: AllowAmbiguousTypes BangPatterns ConstraintKinds DataKinds DefaultSignatures DeriveDataTypeable DeriveGeneric EmptyCase FlexibleContexts FlexibleInstances FunctionalDependencies GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses MultiWayIf NamedFieldPuns NoImplicitPrelude OverloadedStrings OverloadedLabels PatternSynonyms RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TemplateHaskell TupleSections TypeFamilies TypeOperators UndecidableInstances ViewPatterns TypeApplications
default-extensions:
AllowAmbiguousTypes
BangPatterns
ConstraintKinds
DataKinds
DefaultSignatures
DeriveDataTypeable
DeriveGeneric
EmptyCase
FlexibleContexts
FlexibleInstances
FunctionalDependencies
GADTs
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
MultiWayIf
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
OverloadedLabels
PatternSynonyms
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TemplateHaskell
TupleSections
TypeFamilies
TypeOperators
UndecidableInstances
ViewPatterns
TypeApplications
ghc-options: -Wall
build-depends:
base >=4.7 && <5
Expand All @@ -57,7 +89,39 @@ executable servant-util-beam-pg-examples
Paths_servant_util_beam_pg
hs-source-dirs:
examples
default-extensions: AllowAmbiguousTypes BangPatterns ConstraintKinds DataKinds DefaultSignatures DeriveDataTypeable DeriveGeneric EmptyCase FlexibleContexts FlexibleInstances FunctionalDependencies GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses MultiWayIf NamedFieldPuns NoImplicitPrelude OverloadedStrings OverloadedLabels PatternSynonyms RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TemplateHaskell TupleSections TypeFamilies TypeOperators UndecidableInstances ViewPatterns TypeApplications
default-extensions:
AllowAmbiguousTypes
BangPatterns
ConstraintKinds
DataKinds
DefaultSignatures
DeriveDataTypeable
DeriveGeneric
EmptyCase
FlexibleContexts
FlexibleInstances
FunctionalDependencies
GADTs
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
MultiWayIf
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
OverloadedLabels
PatternSynonyms
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TemplateHaskell
TupleSections
TypeFamilies
TypeOperators
UndecidableInstances
ViewPatterns
TypeApplications
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -O2
build-depends:
base >=4.7 && <5
Expand All @@ -82,7 +146,39 @@ test-suite servant-util-beam-pg-test
Paths_servant_util_beam_pg
hs-source-dirs:
tests
default-extensions: AllowAmbiguousTypes BangPatterns ConstraintKinds DataKinds DefaultSignatures DeriveDataTypeable DeriveGeneric EmptyCase FlexibleContexts FlexibleInstances FunctionalDependencies GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses MultiWayIf NamedFieldPuns NoImplicitPrelude OverloadedStrings OverloadedLabels PatternSynonyms RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TemplateHaskell TupleSections TypeFamilies TypeOperators UndecidableInstances ViewPatterns TypeApplications
default-extensions:
AllowAmbiguousTypes
BangPatterns
ConstraintKinds
DataKinds
DefaultSignatures
DeriveDataTypeable
DeriveGeneric
EmptyCase
FlexibleContexts
FlexibleInstances
FunctionalDependencies
GADTs
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
MultiWayIf
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
OverloadedLabels
PatternSynonyms
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TemplateHaskell
TupleSections
TypeFamilies
TypeOperators
UndecidableInstances
ViewPatterns
TypeApplications
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
build-tool-depends:
hspec-discover:hspec-discover
Expand Down
2 changes: 2 additions & 0 deletions servant-util/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ dependencies:
- megaparsec
- mtl
- pretty-terminal
- openapi3
- safe-exceptions
- servant
- servant-client
- servant-client-core
- servant-openapi3
- servant-server
- servant-swagger
- servant-swagger-ui
Expand Down
115 changes: 110 additions & 5 deletions servant-util/servant-util.cabal
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.33.0.
-- This file has been generated from package.yaml by hpack version 0.34.6.
--
-- see: https://github.com/sol/hpack
--
-- hash: 936cf3a2b61cfa35f3cca3316f3946e3e890066234f3e915b0190b1b41bb84a6
-- hash: 38c6786a201462ff66fd6337423755b8df4698ec5793e0a57a3c508c12fff6e1

name: servant-util
version: 0.2
Expand Down Expand Up @@ -66,14 +66,48 @@ library
Servant.Util.Dummy.Sorting
Servant.Util.Error
Servant.Util.Internal.Util
Servant.Util.OpenApiType
Servant.Util.Stats
Servant.Util.Swagger
Servant.Util.SwaggerType
Servant.Util.Util
other-modules:
Paths_servant_util
hs-source-dirs:
src
default-extensions: AllowAmbiguousTypes BangPatterns ConstraintKinds DataKinds DefaultSignatures DeriveDataTypeable DeriveGeneric EmptyCase FlexibleContexts FlexibleInstances FunctionalDependencies GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses MultiWayIf NamedFieldPuns NoImplicitPrelude OverloadedStrings OverloadedLabels PatternSynonyms RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TemplateHaskell TupleSections TypeFamilies TypeOperators UndecidableInstances ViewPatterns TypeApplications
default-extensions:
AllowAmbiguousTypes
BangPatterns
ConstraintKinds
DataKinds
DefaultSignatures
DeriveDataTypeable
DeriveGeneric
EmptyCase
FlexibleContexts
FlexibleInstances
FunctionalDependencies
GADTs
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
MultiWayIf
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
OverloadedLabels
PatternSynonyms
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TemplateHaskell
TupleSections
TypeFamilies
TypeOperators
UndecidableInstances
ViewPatterns
TypeApplications
ghc-options: -Wall
build-depends:
QuickCheck
Expand All @@ -88,13 +122,15 @@ library
, lens
, megaparsec
, mtl
, openapi3
, pretty-terminal
, reflection
, regex-posix
, safe-exceptions
, servant
, servant-client
, servant-client-core
, servant-openapi3
, servant-server
, servant-swagger
, servant-swagger-ui
Expand All @@ -111,10 +147,43 @@ executable servant-util-examples
main-is: Main.hs
other-modules:
Books
BooksOpenApi
Paths_servant_util
hs-source-dirs:
examples
default-extensions: AllowAmbiguousTypes BangPatterns ConstraintKinds DataKinds DefaultSignatures DeriveDataTypeable DeriveGeneric EmptyCase FlexibleContexts FlexibleInstances FunctionalDependencies GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses MultiWayIf NamedFieldPuns NoImplicitPrelude OverloadedStrings OverloadedLabels PatternSynonyms RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TemplateHaskell TupleSections TypeFamilies TypeOperators UndecidableInstances ViewPatterns TypeApplications
default-extensions:
AllowAmbiguousTypes
BangPatterns
ConstraintKinds
DataKinds
DefaultSignatures
DeriveDataTypeable
DeriveGeneric
EmptyCase
FlexibleContexts
FlexibleInstances
FunctionalDependencies
GADTs
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
MultiWayIf
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
OverloadedLabels
PatternSynonyms
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TemplateHaskell
TupleSections
TypeFamilies
TypeOperators
UndecidableInstances
ViewPatterns
TypeApplications
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -O2
build-depends:
QuickCheck
Expand All @@ -129,13 +198,15 @@ executable servant-util-examples
, lens
, megaparsec
, mtl
, openapi3
, pretty-terminal
, reflection
, regex-posix
, safe-exceptions
, servant
, servant-client
, servant-client-core
, servant-openapi3
, servant-server
, servant-swagger
, servant-swagger-ui
Expand Down Expand Up @@ -166,7 +237,39 @@ test-suite servant-util-test
Paths_servant_util
hs-source-dirs:
tests
default-extensions: AllowAmbiguousTypes BangPatterns ConstraintKinds DataKinds DefaultSignatures DeriveDataTypeable DeriveGeneric EmptyCase FlexibleContexts FlexibleInstances FunctionalDependencies GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses MultiWayIf NamedFieldPuns NoImplicitPrelude OverloadedStrings OverloadedLabels PatternSynonyms RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TemplateHaskell TupleSections TypeFamilies TypeOperators UndecidableInstances ViewPatterns TypeApplications
default-extensions:
AllowAmbiguousTypes
BangPatterns
ConstraintKinds
DataKinds
DefaultSignatures
DeriveDataTypeable
DeriveGeneric
EmptyCase
FlexibleContexts
FlexibleInstances
FunctionalDependencies
GADTs
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
MultiWayIf
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
OverloadedLabels
PatternSynonyms
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TemplateHaskell
TupleSections
TypeFamilies
TypeOperators
UndecidableInstances
ViewPatterns
TypeApplications
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
build-tool-depends:
hspec-discover:hspec-discover
Expand All @@ -186,13 +289,15 @@ test-suite servant-util-test
, lens
, megaparsec
, mtl
, openapi3
, pretty-terminal
, reflection
, regex-posix
, safe-exceptions
, servant
, servant-client
, servant-client-core
, servant-openapi3
, servant-server
, servant-swagger
, servant-swagger-ui
Expand Down
4 changes: 2 additions & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# When you update the resolver or add new packages to `extra-deps`, you should
# also bump hackage and stackage indexes used by CI:
# $ niv update hackage.nix; niv update stackage.nix
resolver: lts-17.2
resolver: lts-18.21

packages:
- servant-util
Expand All @@ -21,4 +21,4 @@ extra-deps:
allow-newer: true

nix:
packages: [zlib, postgresql]
packages: [lzma, zlib, postgresql]

0 comments on commit 97c8f5a

Please sign in to comment.