Why do we write f : Type -> Type
instead of just f
below - is it not inferred from Functor f
?:
interface Functor f => Applicative (f : Type -> Type) where
pure : a -> f a
(<*>) : f (a -> b) -> f a -> f b
f
has already had its kind (or should I just say Type in Idris) defined in:
interface Functor (f : Type -> Type) where
map : (m : a -> b) -> f a -> f b
I have heard that there are many situations that Idris cannot infer types where Haskell would due to Idris's dependent type system. Is this one such situation?
A related question, Failed to declare MonadPlus interface constrained on Monad, describes the same behavior, but doesn't really address why the type can't be inferred.