[Haskell-cafe] what's the definition of "satisfy" and "<?>" ?

z_axis at 163.com z_axis at 163.com
Thu May 21 02:10:17 EDT 2009


I cannot understand the following code very well as i donot know the 
definition of "satisfy" and "<?>".

-- | Case-insensitive variant of Parsec's 'char' function.
caseChar        :: Char -> GenParser Char a Char
caseChar c       = satisfy (\x -> toUpper x == toUpper c)

-- | Case-insensitive variant of Parsec's 'string' function.
caseString      :: String -> GenParser Char a ()
caseString cs    = mapM_ caseChar cs <?> cs

Would somebody mind to explain the code in detail ?

Sincerely!




More information about the Haskell-Cafe mailing list