From 32db065b053dafdee1552c592aefdc915ae6e420 Mon Sep 17 00:00:00 2001 From: martoon Date: Mon, 26 Jul 2021 13:50:25 +0300 Subject: [PATCH] Do not use `autoexporter` Problem: at this moment, we want the package to be located on Hackage, but it still fails to render documentation for packages using any build tools, see the [issue](https://github.com/haskell/hackage-server/issues/821). Moreover, my HLS fails to build the project because of autoexporter as well. Solution: replace uses of `autoexporter` with manually written module lists. --- servant-util-beam-pg/package.yaml | 3 --- servant-util-beam-pg/servant-util-beam-pg.cabal | 4 +--- .../src/Servant/Util/Beam/Postgres.hs | 8 +++++++- servant-util/package.yaml | 3 --- servant-util/servant-util.cabal | 4 +--- servant-util/src/Servant/Util/Combinators.hs | 11 ++++++++++- .../src/Servant/Util/Combinators/Filtering/Filters.hs | 7 ++++++- servant-util/src/Servant/Util/Common.hs | 8 +++++++- servant-util/src/Servant/Util/Dummy.hs | 9 ++++++++- 9 files changed, 40 insertions(+), 17 deletions(-) diff --git a/servant-util-beam-pg/package.yaml b/servant-util-beam-pg/package.yaml index 19071b8..d90bbe5 100644 --- a/servant-util-beam-pg/package.yaml +++ b/servant-util-beam-pg/package.yaml @@ -20,9 +20,6 @@ dependencies: library: source-dirs: src - build-tools: - - autoexporter - <<: *ghc-options executables: diff --git a/servant-util-beam-pg/servant-util-beam-pg.cabal b/servant-util-beam-pg/servant-util-beam-pg.cabal index 7bab9b9..e667134 100644 --- a/servant-util-beam-pg/servant-util-beam-pg.cabal +++ b/servant-util-beam-pg/servant-util-beam-pg.cabal @@ -4,7 +4,7 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: 6ef1c6ee74da17c3ee697b9d46aa6057bc4cb254cc1119be49523b207df91a35 +-- hash: 6dc1197e6121504741430e58f847d8e4248a712c21e73e45b694a5520cfa0e9c name: servant-util-beam-pg version: 0.1.0.1 @@ -37,8 +37,6 @@ library 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 ghc-options: -Wall - build-tool-depends: - autoexporter:autoexporter build-depends: base >=4.7 && <5 , beam-core diff --git a/servant-util-beam-pg/src/Servant/Util/Beam/Postgres.hs b/servant-util-beam-pg/src/Servant/Util/Beam/Postgres.hs index 61bbd24..a1058e4 100644 --- a/servant-util-beam-pg/src/Servant/Util/Beam/Postgres.hs +++ b/servant-util-beam-pg/src/Servant/Util/Beam/Postgres.hs @@ -1 +1,7 @@ -{-# OPTIONS_GHC -F -pgmF autoexporter -Wno-dodgy-exports -Wno-unused-imports #-} +module Servant.Util.Beam.Postgres + ( module M + ) where + +import Servant.Util.Beam.Postgres.Filtering as M +import Servant.Util.Beam.Postgres.Pagination as M +import Servant.Util.Beam.Postgres.Sorting as M diff --git a/servant-util/package.yaml b/servant-util/package.yaml index e10bcb5..3eee86f 100644 --- a/servant-util/package.yaml +++ b/servant-util/package.yaml @@ -40,9 +40,6 @@ dependencies: library: source-dirs: src - build-tools: - - autoexporter - <<: *ghc-options executables: diff --git a/servant-util/servant-util.cabal b/servant-util/servant-util.cabal index 10020f6..e7c4106 100644 --- a/servant-util/servant-util.cabal +++ b/servant-util/servant-util.cabal @@ -4,7 +4,7 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: de73541e9d975e3ed0fdec0ca76af4a65ee45c1ba3e85c9dde8b9b02b103cac4 +-- hash: f8f98d17af973304515c0305889a12f2f94d992dd126b9dbbb5adc8bc7767cdc name: servant-util version: 0.1.0.1 @@ -75,8 +75,6 @@ library 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 ghc-options: -Wall - build-tool-depends: - autoexporter:autoexporter build-depends: QuickCheck , aeson diff --git a/servant-util/src/Servant/Util/Combinators.hs b/servant-util/src/Servant/Util/Combinators.hs index 61bbd24..636968a 100644 --- a/servant-util/src/Servant/Util/Combinators.hs +++ b/servant-util/src/Servant/Util/Combinators.hs @@ -1 +1,10 @@ -{-# OPTIONS_GHC -F -pgmF autoexporter -Wno-dodgy-exports -Wno-unused-imports #-} +module Servant.Util.Combinators + ( module M + ) where + +import Servant.Util.Combinators.ErrorResponses as M +import Servant.Util.Combinators.Filtering as M +import Servant.Util.Combinators.Logging as M +import Servant.Util.Combinators.Pagination as M +import Servant.Util.Combinators.Sorting as M +import Servant.Util.Combinators.Tag as M diff --git a/servant-util/src/Servant/Util/Combinators/Filtering/Filters.hs b/servant-util/src/Servant/Util/Combinators/Filtering/Filters.hs index 189628e..4db344f 100644 --- a/servant-util/src/Servant/Util/Combinators/Filtering/Filters.hs +++ b/servant-util/src/Servant/Util/Combinators/Filtering/Filters.hs @@ -1,2 +1,7 @@ -- | Various filter types. -{-# OPTIONS_GHC -F -pgmF autoexporter -Wno-dodgy-exports -Wno-unused-imports #-} +module Servant.Util.Combinators.Filtering.Filters + ( module M + ) where + +import Servant.Util.Combinators.Filtering.Filters.General as M +import Servant.Util.Combinators.Filtering.Filters.Like as M diff --git a/servant-util/src/Servant/Util/Common.hs b/servant-util/src/Servant/Util/Common.hs index 61bbd24..3bfc4b4 100644 --- a/servant-util/src/Servant/Util/Common.hs +++ b/servant-util/src/Servant/Util/Common.hs @@ -1 +1,7 @@ -{-# OPTIONS_GHC -F -pgmF autoexporter -Wno-dodgy-exports -Wno-unused-imports #-} +module Servant.Util.Common + ( module M + ) where + +import Servant.Util.Common.Common as M +import Servant.Util.Common.HList as M +import Servant.Util.Common.PolyKinds as M diff --git a/servant-util/src/Servant/Util/Dummy.hs b/servant-util/src/Servant/Util/Dummy.hs index 6c6ca88..e253ef5 100644 --- a/servant-util/src/Servant/Util/Dummy.hs +++ b/servant-util/src/Servant/Util/Dummy.hs @@ -1,2 +1,9 @@ -- | Contains dummy backend implementations for introduced combinators. -{-# OPTIONS_GHC -F -pgmF autoexporter -Wno-dodgy-exports -Wno-unused-imports #-} + +module Servant.Util.Dummy + ( module M + ) where + +import Servant.Util.Dummy.Filtering as M +import Servant.Util.Dummy.Pagination as M +import Servant.Util.Dummy.Sorting as M