Re: Standard Haskell and Monad Comprehensions

1997-09-02 Thread Daniel Russell
On Tue, 2 Sep 1997, Martin Nor{ick wrote, > Regarding comprehensions: hugs gives me an error for: > [a | a <- [10], b <- getLine ] > and says that getLine must be of type [a], but why? b is not used! Since [10] is a list, this comprehension is used to generate a list, and therefore b must take i

Re: Standard Haskell and Monad Comprehensions

1997-09-02 Thread Martin Norb{ck
On Thu, 28 Aug 1997, Johannes Waldmann wrote: > If comprehensions are allowed for arbitrary monads, > then [x] as an expression means "return, in some monad" > while [x] as a type expression means "the list type". I think this is a nuicanse too, I really haven't grasped the advantages of the mon

Re: Standard Haskell and Monad Comprehensions

1997-08-28 Thread Johannes Waldmann
I'd like to throw in an optical consideration on comprehensions for lists vs. monads: If comprehensions are allowed for arbitrary monads, then [x] as an expression means "return, in some monad" while [x] as a type expression means "the list type". This is a discrepancy. I think it looks confusin

Re: Standard Haskell and Monad Comprehensions

1997-08-27 Thread Meurig Sage
rjmh wrote: > > This is in response to your message about removing the overloading of list > operations in ``Questions on the Table''---actually it more in response to >the > message about removing monad comprehension. I'm pretty new to Haskell (and > functional