
On Friday, May 29, 2020 12:24 PM, Wiebe-Marten Wijnja
Greetings, everyone!
Recently I was involved in a discussion on the new ML-style language 'gleam'.
Gleam has for quite a while now only had an `Either a b` type, with all functions that in Haskell one would use a `Maybe a` for, working on an `Either a ()` instead.
In the discussion(https://github.com/gleam-lang/gleam/issues/591), the language designers were asking the community whether it would make sense to add `Maybe` to the language as well, or keep using only `Either a ()`.
My question: Is the difference between `Maybe a` and `Either a ()` only semantic and are they functionally equivalent, or are there differences in functionality as well?
One can define instance Functor Maybe, and instance Functor (Either ()), but not something like instance Functor (\a -> Either a ()). Therefore, Either () a would be more like Maybe a than Either a (), in Haskell/GHC. kind regards, Arjen