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

2009-05-21 Thread z_a...@163.com
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!


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] what's the definition of satisfy and ? ?

2009-05-21 Thread Lee Duhem
On Thu, May 21, 2009 at 2:10 PM, z_a...@163.com z_a...@163.com wrote:
 I cannot understand the following code very well as i donot know the
 definition of satisfy and ?.

Did you check out the document of parsec? You can find definitions for 'satisty'
and '?' in Text.ParserCombinators.Parsec.Char and Text.ParserCombinators.Prim,
respectively.

lee
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re: [Haskell-cafe] what's the definition of satisfy and ? ?

2009-05-21 Thread Lee Duhem
On Thu, May 21, 2009 at 6:48 PM, z_axis z_a...@163.com wrote:
 Sorry! I am a haskell newbie.   then i will have a look at
 Text.ParserCombinators.Parsec.Char

Don't forget to CC your reply to the list, so other people on the thread
will see your reply.

lee
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe