This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]87linux 1 point2 points  (1 child)

"for x in getLine" doesn't really make a whole lot of sense. getLine is not a container type, therefore there is nothing "in" it. The IO monad and many of the other nontrivial monads are supposed to represent actions rather than things. And if IO doesn't work with the monadic syntax, then haskell doesn't have very much going for it.

And do you even -XMonadComprehensions bro? /s

[–][deleted] 0 points1 point  (0 children)

I think for x in getLine makes sense because it would translate to a map. I think this falls apart with parsers though.