Do you have any references for that? I looked through some Haskell documentation and didn't see anything warning about those functions being unsafe (although there does seem to be an unsafeHGetContents in System.IO.Unsafe).
Is there's something I'm missing that says "hey, this function uses unsafePerformIO behind the scenes" or whatnot? Being not very experienced with Haskell I'm a little worried about library functions being unsafe without me realizing it.
Using getContents is fine for a quick way to slurp in a file, but it's like doing a read without checking for -1. Since haskell is lazy, figuring out why an underlying read failed can be fairly confusing.
If you think your program is doing IO and there's no IO type getting in the way, unsafePerformIO is lurking in the darkness.
Is there's something I'm missing that says "hey, this function uses unsafePerformIO behind the scenes" or whatnot? Being not very experienced with Haskell I'm a little worried about library functions being unsafe without me realizing it.