Haskell – Aplicativos em GHCi

A execução :i Applicativeem ghci produz o seguinte:

class Functor f => Applicative (f :: * -> *) where
pure
:: a -> f a
(<*>) :: f (a -> b) -> f a -> f b
GHC
.Base.liftA2 :: (a -> b -> c) -> f a -> f b -> f c
(*>) :: f a -> f b -> f b
(<*) :: f a -> f b -> f a

Além disso, lista as instâncias disponíveis da typeclass Applicative:

instance Applicative (Either e) -- Defined in ‘Data.Either’
instance
Applicative [] -- Defined in ‘GHC.Base’
instance
Applicative Maybe -- Defined in ‘GHC.Base’
instance
Applicative IO -- Defined in ‘GHC.Base’
instance
Applicative ((->) a) -- Defined in ‘GHC.Base’
instance
Monoid a => Applicative ((,) a) -- Defined in ‘GHC.Base’

Mais informações sobre aplicativos: http://notes.maciejsmolinski.com/2018/02/17/applicatives-by-example/