3 ms·
I think he actually meant "MonadIO m => m a -> m a". Anyway, if I were going to use Haskell-style type signatures in an article about shell scripts written in
by jrockway 17y ago
I think he actually meant "MonadIO m => m a -> m a".
Anyway, if I were going to use Haskell-style type signatures in an article about shell scripts written in Perl, I would probably skip the whole typeclass and monad concept, and just say something like:
keep :: Action -> Action
This doesn't say much about the infinite nature of the process, unfortunately, but modeling effects as though they are pure functions just gets you into trouble anyway. His textual description is much more natural and easier to understand.
Anyway, I like articles that combine both Perl and Haskell :) They make me feel less insane.