hi guys, I don’t understand why types are different for pure (.) and const (.) if they are the same
Applicative instance for function is
instance Applicative ((->) r) where
pure :: a -> (r -> a)
-- or --
pure :: a -> r -> a
pure x = \ _ -> x
-- or --
pure = const
const implementation is
const :: a -> r -> c
const x _ = x
if we apply (.) to const the type will be
const (.) -- :: r -> (b -> c) -> (a -> b) -> a -> c
but if we apply (.) to pure, the type will be
pure (.) :: Applicative f => f ((b -> c) -> (a -> b) -> a -> c)
why for pure, type is not
pure (.) :: Applicative f => f (r -> (b -> c) -> (a -> b) -> a -> c)
is that because r is already partially applied or what?
can you help me to understand? probably I missed subtle thing