I found that I am writing a bunch of functions with a signature
a -> Either longComplicatedType (m longComplicatedType)
So, I decided that I needed an alias
type SomeAlias ma = Either a (ma)
making it just a natural transformation of the functor m isomorphic to forall a. ma -> (Identity β m) a forall a. ma -> (Identity β m) a .
At first I wanted to call it MaybeN or MaybeF , since he used the functor m or nothing. But Maybe a is isomorphic to 1 β a , and Identity not a terminal object in the endofunctors category, Proxy is equal , therefore MaybeN fa should be Either (Proxy a) (fa) .
Is there an existing name for forall a. ma -> (Identity β m) a forall a. ma -> (Identity β m) a , can I steal from another place? Otherwise, there is a more elegant name than IdentityOr ?
source share