aboutsummaryrefslogtreecommitdiff
path: root/CabalHelper/Main.hs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2015-09-24 04:51:50 +0200
committerDaniel Gröber <dxld@darkboxed.org>2015-09-24 04:51:50 +0200
commitc2f6a2e5bf40f9e4cb9276bcc9b58ec3627f727a (patch)
tree77dcdb7c884d32637464f858e0d980376d790f58 /CabalHelper/Main.hs
parentf2bfb9bab04de16e94c8f959c1f5eebe82d6a0aa (diff)
Move package-id to wrapper
we need it before dist/setup-config exists so we can't run it as part of the other queries anyways, might as well go in the wrapper.
Diffstat (limited to 'CabalHelper/Main.hs')
-rw-r--r--CabalHelper/Main.hs14
1 files changed, 0 insertions, 14 deletions
diff --git a/CabalHelper/Main.hs b/CabalHelper/Main.hs
index 48a6ed4..59c3e91 100644
--- a/CabalHelper/Main.hs
+++ b/CabalHelper/Main.hs
@@ -145,7 +145,6 @@ main = do
errMsg $ "distdir '"++distdir++"' does not exist"
exitFailure
- -- ghc-mod will catch multiple cabal files existing before we get here
[cfile] <- filter isCabalFile <$> getDirectoryContents projdir
v <- maybe silent (const deafening) . lookup "GHC_MOD_DEBUG" <$> getEnvironment
@@ -180,10 +179,6 @@ main = do
print =<< flip mapM cmds $$ \cmd -> do
case cmd of
- "package-id":[] ->
- return $ Just $
- ChResponseVersion (display (packageName pd)) (packageVersion pd)
-
"flags":[] -> do
return $ Just $ ChResponseFlags $ sort $
map (flagName' &&& flagDefault) $ genPackageFlags gpd
@@ -441,12 +436,3 @@ renderGhcOptions' lbi v opts = do
#else
return $ renderGhcOptions (compiler lbi) opts
#endif
-
-isCabalFile :: FilePath -> Bool
-isCabalFile f = takeExtension' f == ".cabal"
-
-takeExtension' :: FilePath -> String
-takeExtension' p =
- if takeFileName p == takeExtension p
- then "" -- just ".cabal" is not a valid cabal file
- else takeExtension p