aboutsummaryrefslogtreecommitdiff
path: root/vendor/cabal-helper-0.8.1.2/lib/Distribution
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/cabal-helper-0.8.1.2/lib/Distribution')
-rw-r--r--vendor/cabal-helper-0.8.1.2/lib/Distribution/Helper.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/cabal-helper-0.8.1.2/lib/Distribution/Helper.hs b/vendor/cabal-helper-0.8.1.2/lib/Distribution/Helper.hs
index 1d93b84..a0d32fd 100644
--- a/vendor/cabal-helper-0.8.1.2/lib/Distribution/Helper.hs
+++ b/vendor/cabal-helper-0.8.1.2/lib/Distribution/Helper.hs
@@ -380,8 +380,10 @@ invokeHelper QueryEnv {..} args = do
getPackageId :: MonadQuery m => m (String, Version)
getPackageId = ask >>= \QueryEnv {..} -> do
- [ Just (ChResponseVersion pkgName pkgVer) ] <- readHelper [ "package-id" ]
- return (pkgName, pkgVer)
+ helper <- readHelper [ "package-id" ]
+ case helper of
+ [ Just (ChResponseVersion pkgName pkgVer) ] -> return (pkgName, pkgVer)
+ _ -> error "getPackageId : readHelper"
getSomeConfigState :: MonadQuery m => m SomeLocalBuildInfo
getSomeConfigState = ask >>= \QueryEnv {..} -> do