Hi haskell helpers,
Learning haskell, I wanted to explore how to write pure code and then
add some IO on top of it, keeping the main code pure. The idea was to
write a very simple two-player game, then define some strategies to
play it that do not involve IO, and finally use strategies involving
R
> That depends on the monad library. In transformers it would be:
>
> (Monad m, Eq a) => a -> StateT [a] m Bool
>
> State s is just a type synonym for StateT s Identity, so this works for State
> as well.
I like it, it is simpler than the one using MonadState.
I had read many tutorials and wi
> Simple: the definition of MonadState uses those extensions.
Thanks, yes it helps and explains all. :^)
I suppose then that if -XFlexibleContexts is indeed required by the standard
libraries, it is a "safe" extension, meaning supported by all compilers? Are
many such extensions de-facto standa