
19 Jul
2005
19 Jul
'05
6:21 p.m.
Dinh Tien Tuan Anh wrote:
Hi, Could anyone explain for me why its not possible to return a primitive type (such as Integer, String) while doing some IO actions ?
e.g: foo :: IO() -> String
What does it have to do with "lazy evalution" paradigm ?
In short, to not break functional aproach. Non-IO functions can't call IO functions, because IO functions are evaluated every time you call them. Matej 'Yin' Gagyi