我目前正在阅读《Haskell编程入门》这本书,其中在关于bottom的章节中有一段话:
我的问题是:Windows是否存在任何固有的障碍,使得检测此循环变得不可能或困难,还是只适用于GHC(i)实现?Let us examine a few ways by which we can have bottom in our programs:
Prelude> let x = x in x
*** Exception: << loop >>
Here GHCi detected that let x = x in x was never going to return and short-circuited the never-ending computation. This is an exam- ple of bottom because it was never going to return a result. Note that if you’re using a Windows computer, this example may freeze your GHCi and not throw an exception.