diff --git a/Cabal/src/Distribution/Simple/Program/GHC.hs b/Cabal/src/Distribution/Simple/Program/GHC.hs index cf41ecfbf3c..2f72884d103 100644 --- a/Cabal/src/Distribution/Simple/Program/GHC.hs +++ b/Cabal/src/Distribution/Simple/Program/GHC.hs @@ -1008,8 +1008,8 @@ splitRTSArgs args = case arg of "+RTS" -> addRTSArg arg $ go True rest "-RTS" -> addRTSArg arg $ go False rest - "--RTS" -> (arg : rest, []) - "--" -> (arg : rest, []) + "--RTS" -> ([arg], rest) + "--" -> ([], arg : rest) _ -> if isRTSArg then addRTSArg arg $ go isRTSArg rest