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? We know in Lattice theory, there is also a notion of Bottom
there.....and shouldn't Bottom be defined based on what's the order defined?
Asked
Active
Viewed 2,430 times
26

duplode
- 33,731
- 7
- 79
- 150
-
2I wonder if this may pertain to your question: http://blog.ezyang.com/2010/12/hussling-haskell-types-into-hasse-diagrams/ – Daniel Pratt Jun 16 '11 at 22:51
-
See also http://stackoverflow.com/questions/3962939/whats-the-difference-between-undefined-in-haskell-and-null-in-java – Don Stewart Jun 16 '11 at 23:12
-
Nice! I have been wondering the `null` and `Object` in Java too! – Jun 16 '11 at 23:14
-
I suggest Wikipedia's explanation, It's different from null/void or something looks similar. http://en.wikipedia.org/wiki/Bottom_type – wuxb Jun 17 '11 at 02:53
1 Answers
36
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 ⊥
.

hammar
- 138,522
- 17
- 304
- 385
-
4Is `Just bottom` really the same definedness as `Nothing`? They do both have one layer of "definedness", but `Nothing` is a solid finish, while `Just bottom` is not. – Dan Burton Jun 16 '11 at 23:05
-
17@Dan They are not comparable because they are not in the same chain. All you can say is that they are both above bottom. – augustss Jun 16 '11 at 23:19
-
2@Dan, for some applications `Just bottom` is a solid finish too (`isJust` is one example). – Rotsor Jun 16 '11 at 23:26
-
This (type of) graphic is what gave me my first glimpse into domain theory. Thanks for using it! – luqui Jun 16 '11 at 23:38
-
3
-