Кажется, что MonadRandom из пакета random-fu не является Functor, так как я получаю такие ошибки, как:
Could not deduce (Functor m) arising from a use of ‘_1’
from the context (MonadRandom m)
Я попытался добавить следующий код:
instance Functor MonadRandom where
fmap = liftM
instance Applicative MonadRandom where
pure = return
(<*>) = ap
но я получаю ошибку:
The first argument of ‘Functor’ should have kind ‘* -> *’,
but ‘MonadRandom’ has kind ‘(* -> *) -> Constraint’
In the instance declaration for ‘Functor MonadRandom’
The first argument of ‘Applicative’ should have kind ‘* -> *’,
but ‘MonadRandom’ has kind ‘(* -> *) -> Constraint’
In the instance declaration for ‘Applicative MonadRandom’