aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Compiletime/Program
diff options
context:
space:
mode:
authorJavier Neira <atreyu.bbb@gmail.com>2020-02-10 13:25:49 +0100
committerGitHub <noreply@github.com>2020-02-10 13:25:49 +0100
commit4ca6570ecda0a39fc056c239ada6c2368b4dd698 (patch)
tree3d662edbabea7ea2a6ac57e3e5ac623388827547 /src/CabalHelper/Compiletime/Program
parentc677e7239c95268175d1ad155c2d40b82eb9887a (diff)
Fix patchBuildToolProgs when haddock cannot be found
Cabal's GHC.configure doesn't demand haddock exist, so we have to handle the case where it's not installed.
Diffstat (limited to 'src/CabalHelper/Compiletime/Program')
-rw-r--r--src/CabalHelper/Compiletime/Program/Stack.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/CabalHelper/Compiletime/Program/Stack.hs b/src/CabalHelper/Compiletime/Program/Stack.hs
index d057d65..dc0b0e5 100644
--- a/src/CabalHelper/Compiletime/Program/Stack.hs
+++ b/src/CabalHelper/Compiletime/Program/Stack.hs
@@ -85,7 +85,7 @@ paths qe@QueryEnv{qeProjLoc=ProjLocStackYaml stack_yaml} cwd
workdirArg qe ++ [ "path", "--stack-yaml="++stack_yaml ]
return $ \k -> let Just x = lookup k $ map split $ lines out in x
where
- split l = let (key, ' ' : val) = span (not . isSpace) l in (key, val)
+ split l = let (key, val) = break isSpace l in (key, dropWhile isSpace val)
listPackageCabalFiles :: QueryEnvI c 'Stack -> IO [CabalFile]
listPackageCabalFiles qe@QueryEnv{qeProjLoc}