[Haskell-cafe] Why Maybe exists if there is Either?
Artyom Kazak
yom at artyom.me
Thu Jan 9 15:23:11 UTC 2014
Besides, even defining
type Maybe a = Either () a
in standard library wouldn’t be the same as
data Maybe a = Nothing | Just a
since in Haskell 98 type synonyms aren’t allowed in instance
declarations, which means that programmers would still have to remember
that `Maybe` is actually `Either ()` under-the-hood every time when
writing an instance.
More information about the Haskell-Cafe
mailing list