The concept of Bottom in Haskell

后端 未结 1 508
粉色の甜心
粉色の甜心 2020-12-08 07:16

Bottom in Haskell described here is said to be any computation that have errors, is unterminated, or involves infinite loop, is of any type... is this specific to Haskell? W

相关标签:
1条回答
  • 2020-12-08 08:19

    Indeed there is an order of definedness, where bottom is the least defined value. Have a look at this page about denotational semantics in Haskell for a more thorough explanation.

    Here is a lattice for the values of Maybe Bool taken from the wiki page. It shows that Just True is more defined than Just ⊥ which is more defined than .

    enter image description here

    0 讨论(0)
提交回复
热议问题