| darcs-2.4.4: a distributed, interactive, smart revision control system | Source code | Contents | Index

DateMatcher

Synopsis

parseDateMatcher :: String -> IO (CalendarTime -> Bool)
data DateMatcher = forall d . Show d => DM String (Either ParseError d) (d -> CalendarTime -> Bool)
getMatchers :: String -> IO [DateMatcher]

Documentation

parseDateMatcher :: String -> IO (CalendarTime -> Bool) | Source

`parseDateMatcher` `s` return the first matcher in `getMatchers` that can parse s

data DateMatcher | Source

A `DateMatcher` combines a potential parse for a date string with a matcher function that operates on a given date. We use an existential type on the matcher to allow the date string to either be interpreted as a point in time or as an interval.
Constructors

forall d . Show d => DM String (Either ParseError d) (d -> CalendarTime -> Bool) |

getMatchers :: String -> IO [DateMatcher] | Source

`getMatchers` `d` returns the list of matchers that will be applied on `d`. If you wish to extend the date parsing code, this will likely be the function that you modify to do so.
Produced by Haddock version 2.4.2