mapAccumL, mapAccumR, mapAccumB, foldl2, count,
-- comparisons
- thenCmp, cmpList, prefixMatch, postfixMatch,
+ thenCmp, cmpList, prefixMatch, suffixMatch,
-- strictness
seqList, ($!),
) where
+#include "../includes/config.h"
#include "HsVersions.h"
import List ( zipWith4 )
%************************************************************************
\begin{code}
-unJust :: Maybe a -> String -> a
-unJust (Just x) who = x
-unJust Nothing who = panic ("unJust of Nothing, called by " ++ who)
+unJust :: String -> Maybe a -> a
+unJust who (Just x) = x
+unJust who Nothing = panic ("unJust of Nothing, called by " ++ who)
\end{code}
%************************************************************************
prefixMatch (p:ps) (s:ss) | p == s = prefixMatch ps ss
| otherwise = False
-postfixMatch :: Eq a => [a] -> [a] -> Bool
-postfixMatch pat str = prefixMatch (reverse pat) (reverse str)
+suffixMatch :: Eq a => [a] -> [a] -> Bool
+suffixMatch pat str = prefixMatch (reverse pat) (reverse str)
\end{code}
%************************************************************************