edwinb/Idris-dev — pull request #130 by startling (2012-12-14 02:57:48+00:00)
Title: Some changes for `Applicative`

I fleshed out and corrected some parts of `Applicative`.

* Defined `Alternative` and wrote instances for `Maybe` and `List`
* Define `($>)` and `(<$)`, like Haskell's `(*>)` and `(<*)`.
* Rewrote `guard` using `Alternative` rather than `MonadPlus`
* Rewrote `when`, `sequence`, `sequence_`, `mapM` and `mapM_` to require only `Applicative`, renaming the last two to `traverse` and `traverse_`. I wasn't so sure about the renaming and contemplated writing `mapM` and `mapM_` in terms of their replacements, but I wasn't sure what was best.

I also got rid of `MonadPlus`, because I didn't see a compelling reason to keep it.