Skip to content

Commit

Permalink
Do not use autoexporter
Browse files Browse the repository at this point in the history
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](haskell/hackage-server#821).

Moreover, my HLS fails to build the project because of autoexporter as
well.

Solution: replace uses of `autoexporter` with manually written module
lists.
  • Loading branch information
Martoon-00 committed Jul 26, 2021
1 parent 230e3f5 commit 32db065
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 17 deletions.
3 changes: 0 additions & 3 deletions servant-util-beam-pg/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ dependencies:
library:
source-dirs: src

build-tools:
- autoexporter

<<: *ghc-options

executables:
Expand Down
4 changes: 1 addition & 3 deletions servant-util-beam-pg/servant-util-beam-pg.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion servant-util-beam-pg/src/Servant/Util/Beam/Postgres.hs
Original file line number Diff line number Diff line change
@@ -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
3 changes: 0 additions & 3 deletions servant-util/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ dependencies:
library:
source-dirs: src

build-tools:
- autoexporter

<<: *ghc-options

executables:
Expand Down
4 changes: 1 addition & 3 deletions servant-util/servant-util.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion servant-util/src/Servant/Util/Combinators.hs
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
8 changes: 7 additions & 1 deletion servant-util/src/Servant/Util/Common.hs
Original file line number Diff line number Diff line change
@@ -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
9 changes: 8 additions & 1 deletion servant-util/src/Servant/Util/Dummy.hs
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 32db065

Please sign in to comment.