Re: [Haskell-cafe] How to understand `|` in this code snippet ?

2010-02-27 Thread Lee Duhem
On Sat, Feb 27, 2010 at 5:07 PM, zaxis z_a...@163.com wrote: xxxMain = do    timeout - getEnv xxx_TIMEOUT    case timeout of        Just str | [(t, _)] - reads str - do            addTimeout t (hPutStrLn stderr *** TIMEOUT _exit 1)            return ()        _ - return () ... What

Re: [Haskell-cafe] A Reader Monad Tutorial

2009-06-28 Thread Lee Duhem
On Sun, Jun 28, 2009 at 12:41 AM, Henry Laxennadine.and.he...@pobox.com wrote: Dear Group, If any of you are struggling with understanding monads, I've tried to put together a pretty through explanation of what is behind the Reader monad.  If you're interested, have a look at:

Re: [Haskell-cafe] Re: Need some help with an infinite list - Ouch

2009-06-18 Thread Lee Duhem
On Wed, Jun 17, 2009 at 7:30 PM, GüŸnther Schmidtgue.schm...@web.de wrote: Hi all, you have come up with so many solutions it's embarrassing to admit that I didn't come up with even one. I have the similarly difficulties, but I found to understand some of these answers, equational reasoning

Re: [Haskell-cafe] Re: Need some help with an infinite list

2009-06-18 Thread Lee Duhem
On Fri, Jun 19, 2009 at 6:17 AM, Matthew Brecknellhask...@brecknell.org wrote: On Thu, 2009-06-18 at 23:57 +0800, Lee Duhem wrote: [...] I have prepared a blog post for how I worked out some of these answers, here is the draft of it, I hope it can help you too. Nice post! Certainly, pen

Re: [Haskell-cafe] Type families in export lists

2009-05-31 Thread Lee Duhem
On Sun, May 31, 2009 at 7:10 PM, Manuel M T Chakravarty c...@cse.unsw.edu.au wrote: Lee Duhem: On Sat, May 30, 2009 at 7:35 PM, Maurí cio briqueabra...@yahoo.com wrote: Hi, How do I include type families (used as associated types) in a module export list? E.g.: class MyClass a where

Re: [Haskell-cafe] Type families in export lists

2009-05-30 Thread Lee Duhem
On Sat, May 30, 2009 at 7:35 PM, Maurí­cio briqueabra...@yahoo.com wrote: Hi, How do I include type families (used as associated types) in a module export list? E.g.: class MyClass a where    type T a :: *    coolFunction :: Ta - a    (...) If I just include MyClass and its functions in

Re: [Haskell-cafe] Re: What's the problem with iota's type signature?

2009-05-28 Thread Lee Duhem
On Thu, May 28, 2009 at 5:19 PM, Gracjan Polak gracjanpo...@gmail.com wrote: You don't have to guess then, Haskell compiler can do the guessing for you. It isn't guess, Haskell compiler (like GHC) gets these types by (type) inference, as you said :-) lee It is called type inference.

Re: [Haskell-cafe] What's the problem with iota's type signature?

2009-05-27 Thread Lee Duhem
On Thu, May 28, 2009 at 10:33 AM, michael rice nowg...@yahoo.com wrote: Still exploring monads. I don't understand why the type signature for double is OK, but not the one for iota. Michael = --double :: (Int a) = a - Maybe b --double x = Just (x + x) Prelude let double x

Re: [Haskell-cafe] Design in Haskell?

2009-05-26 Thread Lee Duhem
On Wed, May 27, 2009 at 6:50 AM, Michael Steele mikesteel...@gmail.com wrote: I've recently found Brent Yorgey's The Typeclassopedia very helpful. You can find it in The Monad.Reader Issue 13. It's great, thank you Michael. lee ___ Haskell-Cafe

Re: [Haskell-cafe] Design in Haskell?

2009-05-25 Thread Lee Duhem
On Mon, May 25, 2009 at 4:22 PM, Dan danielkc...@gmail.com wrote: Are there any suggestions of wikis, books or particularly well-architected and readable projects I could look at to about learn larger-scale design in Haskell? XMonad is pretty good, see http://xmonad.org/ For its design and

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

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

Re: [Haskell-cafe] How i use GHC.Word.Word8 wit Int ?

2009-05-19 Thread Lee Duhem
2009/5/20 Bernie Pope florbit...@gmail.com: Oh right. I didn't see your proposal (did it get sent to the list?). Yes, I just push the Replay button, not the Sorry for the confusion. It's my fault, sorry. lee ___ Haskell-Cafe mailing list