Ticket #3453 (closed proposal: wontfix)
Add "check" function to Control.Monad
| Reported by: | JonFairbairn | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Not GHC |
| Component: | libraries/base | Version: | 6.10.4 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
Generalisation of "guard".
check (not . isSpace) 'c' == Just 'c'
check (not . isSpace) ' ' == Nothing
See example in attached darcs patch
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

