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 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe