You can dream up any semantics you like about bottom, like it has to be () for the unit type. But it's simply not true. I suggest you do some cursory study of denotational semantics and domain theory. Ordinary programming languages include non-termination, so that has to be captured somehow in the semantics. And that's what bottom does.
-- Lennart On Sat, Jan 24, 2009 at 9:31 PM, Thomas Davie <tom.da...@gmail.com> wrote: > > On 24 Jan 2009, at 22:19, Henning Thielemann wrote: > >> >> On Sat, 24 Jan 2009, Thomas Davie wrote: >> >>> On 24 Jan 2009, at 21:31, Dan Doel wrote: >>> >>>> For integers, is _|_ equal to 0? 1? 2? ... >>> >>> Hypothetically (as it's already been pointed out that this is not the >>> case in Haskell), _|_ in the integers would not be known, until it became >>> more defined. I'm coming at this from the point of view that bottom would >>> contain all the information we could possibly know about a value while >>> still being the least value in the set. >>> >>> In such a scheme, bottom for Unit would be (), as we always know that the >>> value in that type is (); bottom for pairs would be (_|_, _|_), as all pairs >>> look like that (this incidentally would allow fmap and second to be equal on >>> pairs); bottom for integers would contain no information, etc. >> >> Zero- and one-constructor data types would then significantly differ from >> two- and more-constructor data types, wouldn't they? > > Yes, they would, but not in any way that's defined, or written in, the fact > that they have a nice property of being able to tell something about what > bottom looks like is rather nice actually. > > Bob > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe