Visualizing Types: Hussling Haskell types into Hasse diagrams
blog.ezyang.com
blog.ezyang.com
But, the one thing that sticks out to me is that NIL is a full-fledged value in Lisp, and I've never seen an equivalent bottom type in any Haskell tutorial. In fact, it would seem to violate the strictness of the type system (given that I don't fully understand said type system). Does Haskell have a "real" (reifiable?) bottom type, i.e. can your functions actually return bottom in a valid program, or is the bottom value only something that appears when you're doing theoretical analysis of the type system? I know that Bottom sometimes represents uncaught exceptions or infinite loops in type theory, does Haskell use it in the same way?
It's not appropriate to call NIL/NULL bottom, because it is a real value and we can always do computation on it (if var == NIL). Because always detecting bottom is equivalent to the halting problem, we lose. Of course, GHC will sometimes raise a NonTermination exception ;-)