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 its values from a list.
b is used since:
[a | a <- [10], b <- "getLine"] = [10,10,10,10,10,10,10]
Dan Russell
Kingston Business School
- Re: Standard Haskell and Monad Comprehensions Meurig Sage
- Re: Standard Haskell and Monad Comprehensions Johannes Waldmann
- Re: Standard Haskell and Monad Comprehensions Martin Norb{ck
- Daniel Russell
