Concrete Type Example of a Functor that Fails to be an Applicative?

Viewed 467

From functors that are not applicatives:

A type constructor which is a Functor but not an Applicative. A simple example is a pair:

instance Functor ((,) r) where
    fmap f (x,y) = (x, f y)

But there is no way how to define its Applicative instance without imposing additional restrictions on r. In particular, there is no way how to define pure :: a -> (r, a) for an arbitrary r.

Here, pure fails to be definable for all types at once; however, for any concrete type T, one can make ((,) T) an applicative.

Question: Is there an example of a concrete functor (i.e., no type variables involved) that is a functor but not an applicative?

3 Answers
Related