X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FUtil.lhs;h=495df8257fe0af8d175c21687549f52e272d7e81;hb=a65481fce16930ff0cd343c9278d9b8961bee94f;hp=bfb499a2c8ad020d45649b7d69749d324544b290;hpb=3da243bf737dc3e26dfbfa943df1fda1ce7c1bab;p=ghc-hetmet.git diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index bfb499a..495df82 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -590,6 +590,8 @@ cmpList cmp (a:as) (b:bs) \end{code} \begin{code} +-- This (with a more general type) is Data.List.stripPrefix from GHC 6.8. +-- This definition can be removed once we require at least 6.8 to build. maybePrefixMatch :: String -> String -> Maybe String maybePrefixMatch [] rest = Just rest maybePrefixMatch (_:_) [] = Nothing