aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Shared
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-08-06 02:06:54 +0200
committerDaniel Gröber (dxld) <dxld@darkboxed.org>2019-09-17 17:48:26 +0200
commit29c13da426a9009754f5d32351a9f54bccf3cbb5 (patch)
tree44e578b0dec3b06b8b455f41075bb82e1fdfd37b /src/CabalHelper/Shared
parentc70e8076803bd29d7675ed493ebb1ca246891b34 (diff)
Remove crusty old helper code
- Inplace component inlining really always was a nasty cludge, now that we have proper build-system support we can get rid of it. - GHC options subsets aren't really needed, we can split these up after parsing the options using the ghc library. - Dropped GHC 7.10, it seems unsupportable without the inplace component inlining, possibly a Stack/lib:Cabal bug, but it is quite old so time for it to go anyway. This is the second thing commit it was holing up too!
Diffstat (limited to 'src/CabalHelper/Shared')
-rw-r--r--src/CabalHelper/Shared/InterfaceTypes.hs45
1 files changed, 11 insertions, 34 deletions
diff --git a/src/CabalHelper/Shared/InterfaceTypes.hs b/src/CabalHelper/Shared/InterfaceTypes.hs
index 87536a5..ed06045 100644
--- a/src/CabalHelper/Shared/InterfaceTypes.hs
+++ b/src/CabalHelper/Shared/InterfaceTypes.hs
@@ -39,10 +39,8 @@ import Data.Map.Strict (Map)
data ChResponse
= ChResponseComponentsInfo (Map ChComponentName ChComponentInfo)
| ChResponseList [String]
- | ChResponsePkgDbs [ChPkgDb]
| ChResponseLbi String
| ChResponseVersion (String, Version)
- | ChResponseLicenses [(String, [(String, Version)])]
| ChResponseFlags [(String, Bool)]
deriving (Eq, Ord, Read, Show, Generic)
@@ -68,16 +66,6 @@ data ChComponentInfo = ChComponentInfo
, ciGhcOptions :: [String]
-- ^ Full set of GHC options, ready for loading this component into GHCi.
- , ciGhcSrcOptions :: [String]
- -- ^ Only search path related GHC options.
-
- , ciGhcPkgOptions :: [String]
- -- ^ Only package related GHC options, sufficient for things don't need to
- -- access any home modules.
-
- , ciGhcLangOptions :: [String]
- -- ^ Only Haskell language extension related options, i.e. @-XSomeExtension@
-
, ciSourceDirs :: [String]
-- ^ A component's @hs-source-dirs@ field, note that this only contains the
-- directories specified by the cabal file, however cabal also adds the
@@ -87,32 +75,21 @@ data ChComponentInfo = ChComponentInfo
, ciEntrypoints :: ChEntrypoint
-- ^ Modules or files Cabal would have the compiler build directly. Can be
-- used to compute the home module closure for a component.
-
- , ciNeedsBuildOutput :: NeedsBuildOutput
- -- ^ If a component has a non-default module renaming (backpack) it cannot
- -- be built in memory and instead needs proper build output.
- -- TODO: This is a ghc-mod legacy thing and has to be removed
} deriving (Eq, Ord, Read, Show)
--- TODO: we know the source-dir now so we can resolve ChSetupEntrypoint
--- internally
-data ChEntrypoint = ChSetupEntrypoint -- ^ Almost like 'ChExeEntrypoint' but
- -- @main-is@ could either be @"Setup.hs"@
- -- or @"Setup.lhs"@. Since we don't know
- -- where the source directory is you have
- -- to find these files.
- | ChLibEntrypoint { chExposedModules :: [ChModuleName]
- , chOtherModules :: [ChModuleName]
- , chSignatures :: [ChModuleName] -- backpack only
- }
- | ChExeEntrypoint { chMainIs :: FilePath
- , chOtherModules :: [ChModuleName]
- } deriving (Eq, Ord, Read, Show, Generic)
+data ChEntrypoint
+ = ChSetupEntrypoint
+ | ChLibEntrypoint
+ { chExposedModules :: [ChModuleName]
+ , chOtherModules :: [ChModuleName]
+ , chSignatures :: [ChModuleName] -- backpack only
+ }
+ | ChExeEntrypoint
+ { chMainIs :: FilePath
+ , chOtherModules :: [ChModuleName]
+ } deriving (Eq, Ord, Read, Show, Generic)
data ChPkgDb = ChPkgGlobal
| ChPkgUser
| ChPkgSpecific FilePath
deriving (Eq, Ord, Read, Show, Generic)
-
-data NeedsBuildOutput = ProduceBuildOutput | NoBuildOutput
- deriving (Eq, Ord, Read, Show, Generic)