Are there any good examples of Functor
s which are not Applicative
s? By good, I'm seeking non-trivial (not Const Void
) examples which don't need appeals to undefined
. If there are none is there any method of proving that the space there is uninteresting?
This is similar to Good examples of Not a Functor/Functor/Applicative/Monad?, but it wasn't completely resolved there.
As a follow-up question, are there any interesting examples of Functor
s which might be left without Applicative
instances due to having far too many non-canonical Applicative
instances to be meaningful? For instance, "extended Maybe
" is a bit boring
data MayB a = Jus a | Nothing1 | Nothing2 | Nothing3 | ...
instance Applicative MayB where
pure = Jus
Jus f <*> Jus x = Jus (f x)
Jus f <*> n = n
n <*> Jus x = n
n1 <*> n2 = methodOfResolvingNothingWhatsoever n1 n2
Are there examples where the variations of the Applicative
instance are more material?