From fdcb0ced3ff1628edf8dac16adbbdf7b10ed9052 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sat, 5 Mar 2011 15:39:31 +0000 Subject: [PATCH] Fix build, and improve ghc-cabal's errors --- utils/ghc-cabal/Main.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs index 0581f14..72a5010 100644 --- a/utils/ghc-cabal/Main.hs +++ b/utils/ghc-cabal/Main.hs @@ -393,13 +393,13 @@ generate config_args distdir directory escape = foldr (\c xs -> if c == '#' then '\\':'#':xs else c:xs) [] wrap = mapM wrap1 wrap1 s - | null s = die "Wrapping empty value" - | '\'' `elem` s = die "Single quote in value to be wrapped" + | null s = die ["Wrapping empty value"] + | '\'' `elem` s = die ["Single quote in value to be wrapped:", s] -- We want to be able to assume things like is the -- start of a value, so check there are no spaces in confusing -- positions - | head s == ' ' = die "Leading space in value to be wrapped" - | last s == ' ' = die "Trailing space in value to be wrapped" + | head s == ' ' = die ["Leading space in value to be wrapped:", s] + | last s == ' ' = die ["Trailing space in value to be wrapped:", s] | otherwise = return ("\'" ++ s ++ "\'") boolToYesNo True = "YES" boolToYesNo False = "NO" -- 1.7.10.4