summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/src/Flavour.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs
index a7a32ed634..ec9bfa2c5b 100644
--- a/hadrian/src/Flavour.hs
+++ b/hadrian/src/Flavour.hs
@@ -117,13 +117,14 @@ parseFlavour baseFlavours transformers str =
parser = do
base <- baseFlavour
transs <- P.many flavourTrans
+ P.eof
return $ foldr ($) base transs
baseFlavour :: Parser Flavour
baseFlavour =
P.choice [ f <$ P.try (P.string (name f))
- | f <- baseFlavours
- ]
+ | f <- reverse (sortOn name baseFlavours)
+ ] -- needed to parse e.g. "quick-debug" before "quick"
flavourTrans :: Parser (Flavour -> Flavour)
flavourTrans = do