Why does <*> of the Const instance accept two non-functional values?

Viewed 111
(<*>) :: Applicative f => f (a -> b) -> f a -> f b
Const :: a -> Const a b
Monoid m => Applicative (Const * m)

Const "a" <*> Const "b" -- yields Const "ab"
Const a <*> Const a = Const a <> Const a

I guess this behavior must have something to do with the fact that Const is a binary type constructor, where b is never touched (phantom type). But then again I don't understand Const * m, because a (and * respectively) seems to be discarded in this case.

1 Answers
Related