Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data DayOfMonth
- = DayOfMonth_01
- | DayOfMonth_02
- | DayOfMonth_03
- | DayOfMonth_04
- | DayOfMonth_05
- | DayOfMonth_06
- | DayOfMonth_07
- | DayOfMonth_08
- | DayOfMonth_09
- | DayOfMonth_10
- | DayOfMonth_11
- | DayOfMonth_12
- | DayOfMonth_13
- | DayOfMonth_14
- | DayOfMonth_15
- | DayOfMonth_16
- | DayOfMonth_17
- | DayOfMonth_18
- | DayOfMonth_19
- | DayOfMonth_20
- | DayOfMonth_21
- | DayOfMonth_22
- | DayOfMonth_23
- | DayOfMonth_24
- | DayOfMonth_25
- | DayOfMonth_26
- | DayOfMonth_27
- | DayOfMonth_28
- | DayOfMonth_29
- | DayOfMonth_30
- | DayOfMonth_31
- class HasDayOfMonth c where
- class AsDayOfMonth r where
- parseDayOfMonth :: CharParsing f => f DayOfMonth
- data HourOfDay
- = HourOfDay_00
- | HourOfDay_01
- | HourOfDay_02
- | HourOfDay_03
- | HourOfDay_04
- | HourOfDay_05
- | HourOfDay_06
- | HourOfDay_07
- | HourOfDay_08
- | HourOfDay_09
- | HourOfDay_10
- | HourOfDay_11
- | HourOfDay_12
- | HourOfDay_13
- | HourOfDay_14
- | HourOfDay_15
- | HourOfDay_16
- | HourOfDay_17
- | HourOfDay_18
- | HourOfDay_19
- | HourOfDay_20
- | HourOfDay_21
- | HourOfDay_22
- | HourOfDay_23
- class HasHourOfDay c where
- class AsHourOfDay r where
- parseHourOfDay :: CharParsing f => f HourOfDay
- data MinuteOfHour
- = MinuteOfHour_00
- | MinuteOfHour_01
- | MinuteOfHour_02
- | MinuteOfHour_03
- | MinuteOfHour_04
- | MinuteOfHour_05
- | MinuteOfHour_06
- | MinuteOfHour_07
- | MinuteOfHour_08
- | MinuteOfHour_09
- | MinuteOfHour_10
- | MinuteOfHour_11
- | MinuteOfHour_12
- | MinuteOfHour_13
- | MinuteOfHour_14
- | MinuteOfHour_15
- | MinuteOfHour_16
- | MinuteOfHour_17
- | MinuteOfHour_18
- | MinuteOfHour_19
- | MinuteOfHour_20
- | MinuteOfHour_21
- | MinuteOfHour_22
- | MinuteOfHour_23
- | MinuteOfHour_24
- | MinuteOfHour_25
- | MinuteOfHour_26
- | MinuteOfHour_27
- | MinuteOfHour_28
- | MinuteOfHour_29
- | MinuteOfHour_30
- | MinuteOfHour_31
- | MinuteOfHour_32
- | MinuteOfHour_33
- | MinuteOfHour_34
- | MinuteOfHour_35
- | MinuteOfHour_36
- | MinuteOfHour_37
- | MinuteOfHour_38
- | MinuteOfHour_39
- | MinuteOfHour_40
- | MinuteOfHour_41
- | MinuteOfHour_42
- | MinuteOfHour_43
- | MinuteOfHour_44
- | MinuteOfHour_45
- | MinuteOfHour_46
- | MinuteOfHour_47
- | MinuteOfHour_48
- | MinuteOfHour_49
- | MinuteOfHour_50
- | MinuteOfHour_51
- | MinuteOfHour_52
- | MinuteOfHour_53
- | MinuteOfHour_54
- | MinuteOfHour_55
- | MinuteOfHour_56
- | MinuteOfHour_57
- | MinuteOfHour_58
- | MinuteOfHour_59
- class HasMinuteOfHour c where
- class AsMinuteOfHour r where
- parseMinuteOfHour :: CharParsing f => f MinuteOfHour
- data SixFigureGroup = SixFigureGroup {}
- class HasSixFigureGroup c where
- parseSixFigureGroup :: CharParsing f => f SixFigureGroup
- parseSixFigureGroupz :: CharParsing f => f SixFigureGroup
Documentation
data DayOfMonth Source #
class HasDayOfMonth c where Source #
dayOfMonth :: Lens' c DayOfMonth Source #
class AsDayOfMonth r where Source #
_DayOfMonth :: Prism' r DayOfMonth Source #
_DayOfMonth_01 :: Prism' r () Source #
_DayOfMonth_02 :: Prism' r () Source #
_DayOfMonth_03 :: Prism' r () Source #
_DayOfMonth_04 :: Prism' r () Source #
_DayOfMonth_05 :: Prism' r () Source #
_DayOfMonth_06 :: Prism' r () Source #
_DayOfMonth_07 :: Prism' r () Source #
_DayOfMonth_08 :: Prism' r () Source #
_DayOfMonth_09 :: Prism' r () Source #
_DayOfMonth_10 :: Prism' r () Source #
_DayOfMonth_11 :: Prism' r () Source #
_DayOfMonth_12 :: Prism' r () Source #
_DayOfMonth_13 :: Prism' r () Source #
_DayOfMonth_14 :: Prism' r () Source #
_DayOfMonth_15 :: Prism' r () Source #
_DayOfMonth_16 :: Prism' r () Source #
_DayOfMonth_17 :: Prism' r () Source #
_DayOfMonth_18 :: Prism' r () Source #
_DayOfMonth_19 :: Prism' r () Source #
_DayOfMonth_20 :: Prism' r () Source #
_DayOfMonth_21 :: Prism' r () Source #
_DayOfMonth_22 :: Prism' r () Source #
_DayOfMonth_23 :: Prism' r () Source #
_DayOfMonth_24 :: Prism' r () Source #
_DayOfMonth_25 :: Prism' r () Source #
_DayOfMonth_26 :: Prism' r () Source #
_DayOfMonth_27 :: Prism' r () Source #
_DayOfMonth_28 :: Prism' r () Source #
_DayOfMonth_29 :: Prism' r () Source #
_DayOfMonth_30 :: Prism' r () Source #
_DayOfMonth_31 :: Prism' r () Source #
parseDayOfMonth :: CharParsing f => f DayOfMonth Source #
Parse two digits to a day of month (01-31).
>>>
parse parseDayOfMonth "test" "01"
Right DayOfMonth_01
>>>
parse parseDayOfMonth "test" "02"
Right DayOfMonth_02
>>>
parse parseDayOfMonth "test" "18"
Right DayOfMonth_18
>>>
parse parseDayOfMonth "test" "30"
Right DayOfMonth_30
>>>
parse parseDayOfMonth "test" "31"
Right DayOfMonth_31
>>>
isn't _Right (parse parseDayOfMonth "test" "00")
True
>>>
isn't _Right (parse parseDayOfMonth "test" "32")
True
>>>
isn't _Right (parse parseDayOfMonth "test" "9")
True
>>>
parse (show <$> parseDayOfMonth <|> string "00") "test" "00"
Right "00"
class HasHourOfDay c where Source #
class AsHourOfDay r where Source #
_HourOfDay :: Prism' r HourOfDay Source #
_HourOfDay_00 :: Prism' r () Source #
_HourOfDay_01 :: Prism' r () Source #
_HourOfDay_02 :: Prism' r () Source #
_HourOfDay_03 :: Prism' r () Source #
_HourOfDay_04 :: Prism' r () Source #
_HourOfDay_05 :: Prism' r () Source #
_HourOfDay_06 :: Prism' r () Source #
_HourOfDay_07 :: Prism' r () Source #
_HourOfDay_08 :: Prism' r () Source #
_HourOfDay_09 :: Prism' r () Source #
_HourOfDay_10 :: Prism' r () Source #
_HourOfDay_11 :: Prism' r () Source #
_HourOfDay_12 :: Prism' r () Source #
_HourOfDay_13 :: Prism' r () Source #
_HourOfDay_14 :: Prism' r () Source #
_HourOfDay_15 :: Prism' r () Source #
_HourOfDay_16 :: Prism' r () Source #
_HourOfDay_17 :: Prism' r () Source #
_HourOfDay_18 :: Prism' r () Source #
_HourOfDay_19 :: Prism' r () Source #
_HourOfDay_20 :: Prism' r () Source #
_HourOfDay_21 :: Prism' r () Source #
_HourOfDay_22 :: Prism' r () Source #
_HourOfDay_23 :: Prism' r () Source #
parseHourOfDay :: CharParsing f => f HourOfDay Source #
Parse two digits to an hour of day (00-23).
>>>
parse parseHourOfDay "test" "00"
Right HourOfDay_00
>>>
parse parseHourOfDay "test" "01"
Right HourOfDay_01
>>>
parse parseHourOfDay "test" "18"
Right HourOfDay_18
>>>
parse parseHourOfDay "test" "22"
Right HourOfDay_22
>>>
parse parseHourOfDay "test" "23"
Right HourOfDay_23
>>>
isn't _Right (parse parseHourOfDay "test" "24")
True
>>>
isn't _Right (parse parseHourOfDay "test" "9")
True
>>>
parse (show <$> parseHourOfDay <|> string "25") "test" "25"
Right "25"
data MinuteOfHour Source #
class HasMinuteOfHour c where Source #
minuteOfHour :: Lens' c MinuteOfHour Source #
class AsMinuteOfHour r where Source #
_MinuteOfHour :: Prism' r MinuteOfHour Source #
_MinuteOfHour_00 :: Prism' r () Source #
_MinuteOfHour_01 :: Prism' r () Source #
_MinuteOfHour_02 :: Prism' r () Source #
_MinuteOfHour_03 :: Prism' r () Source #
_MinuteOfHour_04 :: Prism' r () Source #
_MinuteOfHour_05 :: Prism' r () Source #
_MinuteOfHour_06 :: Prism' r () Source #
_MinuteOfHour_07 :: Prism' r () Source #
_MinuteOfHour_08 :: Prism' r () Source #
_MinuteOfHour_09 :: Prism' r () Source #
_MinuteOfHour_10 :: Prism' r () Source #
_MinuteOfHour_11 :: Prism' r () Source #
_MinuteOfHour_12 :: Prism' r () Source #
_MinuteOfHour_13 :: Prism' r () Source #
_MinuteOfHour_14 :: Prism' r () Source #
_MinuteOfHour_15 :: Prism' r () Source #
_MinuteOfHour_16 :: Prism' r () Source #
_MinuteOfHour_17 :: Prism' r () Source #
_MinuteOfHour_18 :: Prism' r () Source #
_MinuteOfHour_19 :: Prism' r () Source #
_MinuteOfHour_20 :: Prism' r () Source #
_MinuteOfHour_21 :: Prism' r () Source #
_MinuteOfHour_22 :: Prism' r () Source #
_MinuteOfHour_23 :: Prism' r () Source #
_MinuteOfHour_24 :: Prism' r () Source #
_MinuteOfHour_25 :: Prism' r () Source #
_MinuteOfHour_26 :: Prism' r () Source #
_MinuteOfHour_27 :: Prism' r () Source #
_MinuteOfHour_28 :: Prism' r () Source #
_MinuteOfHour_29 :: Prism' r () Source #
_MinuteOfHour_30 :: Prism' r () Source #
_MinuteOfHour_31 :: Prism' r () Source #
_MinuteOfHour_32 :: Prism' r () Source #
_MinuteOfHour_33 :: Prism' r () Source #
_MinuteOfHour_34 :: Prism' r () Source #
_MinuteOfHour_35 :: Prism' r () Source #
_MinuteOfHour_36 :: Prism' r () Source #
_MinuteOfHour_37 :: Prism' r () Source #
_MinuteOfHour_38 :: Prism' r () Source #
_MinuteOfHour_39 :: Prism' r () Source #
_MinuteOfHour_40 :: Prism' r () Source #
_MinuteOfHour_41 :: Prism' r () Source #
_MinuteOfHour_42 :: Prism' r () Source #
_MinuteOfHour_43 :: Prism' r () Source #
_MinuteOfHour_44 :: Prism' r () Source #
_MinuteOfHour_45 :: Prism' r () Source #
_MinuteOfHour_46 :: Prism' r () Source #
_MinuteOfHour_47 :: Prism' r () Source #
_MinuteOfHour_48 :: Prism' r () Source #
_MinuteOfHour_49 :: Prism' r () Source #
_MinuteOfHour_50 :: Prism' r () Source #
_MinuteOfHour_51 :: Prism' r () Source #
_MinuteOfHour_52 :: Prism' r () Source #
_MinuteOfHour_53 :: Prism' r () Source #
_MinuteOfHour_54 :: Prism' r () Source #
_MinuteOfHour_55 :: Prism' r () Source #
_MinuteOfHour_56 :: Prism' r () Source #
_MinuteOfHour_57 :: Prism' r () Source #
_MinuteOfHour_58 :: Prism' r () Source #
_MinuteOfHour_59 :: Prism' r () Source #
parseMinuteOfHour :: CharParsing f => f MinuteOfHour Source #
Parse two digits to a minute of hour (00-59).
>>>
parse parseMinuteOfHour "test" "00"
Right MinuteOfHour_00
>>>
parse parseMinuteOfHour "test" "01"
Right MinuteOfHour_01
>>>
parse parseMinuteOfHour "test" "18"
Right MinuteOfHour_18
>>>
parse parseMinuteOfHour "test" "58"
Right MinuteOfHour_58
>>>
parse parseMinuteOfHour "test" "59"
Right MinuteOfHour_59
>>>
isn't _Right (parse parseMinuteOfHour "test" "60")
True
>>>
isn't _Right (parse parseMinuteOfHour "test" "9")
True
>>>
parse (show <$> parseMinuteOfHour <|> string "61") "test" "61"
Right "61"
data SixFigureGroup Source #
class HasSixFigureGroup c where Source #
sixFigureGroup :: Lens' c SixFigureGroup Source #
dayofmonth :: Lens' c DayOfMonth Source #
hourofday :: Lens' c HourOfDay Source #
minuteofhour :: Lens' c MinuteOfHour Source #
parseSixFigureGroup :: CharParsing f => f SixFigureGroup Source #
Parse six digits to a six figure group.
>>>
parse parseSixFigureGroup "test" "302301"
Right (SixFigureGroup {_dayofmonth = DayOfMonth_30, _hourofday = HourOfDay_23, _minuteofhour = MinuteOfHour_01})
>>>
parse parseSixFigureGroup "test" "090113"
Right (SixFigureGroup {_dayofmonth = DayOfMonth_09, _hourofday = HourOfDay_01, _minuteofhour = MinuteOfHour_13})
>>>
isn't _Right (parse parseSixFigureGroup "test" "322301")
True
>>>
isn't _Right (parse parseSixFigureGroup "test" "302401")
True
>>>
isn't _Right (parse parseSixFigureGroup "test" "302360")
True
>>>
isn't _Right (parse parseSixFigureGroup "test" "30230")
True
>>>
parse (show <$> parseSixFigureGroup <|> string "302360") "test" "302360"
Right "302360"
parseSixFigureGroupz :: CharParsing f => f SixFigureGroup Source #
Parse six digits to a six figure group appended with Z
.
>>>
parse parseSixFigureGroup "test" "302301Z"
Right (SixFigureGroup {_dayofmonth = DayOfMonth_30, _hourofday = HourOfDay_23, _minuteofhour = MinuteOfHour_01})
>>>
parse parseSixFigureGroup "test" "090113Z"
Right (SixFigureGroup {_dayofmonth = DayOfMonth_09, _hourofday = HourOfDay_01, _minuteofhour = MinuteOfHour_13})
>>>
isn't _Right (parse parseSixFigureGroup "test" "322301Z")
True
>>>
isn't _Right (parse parseSixFigureGroup "test" "302401Z")
True
>>>
isn't _Right (parse parseSixFigureGroup "test" "302360Z")
True
>>>
isn't _Right (parse parseSixFigureGroup "test" "30230Z")
True
>>>
parse (show <$> parseSixFigureGroup <|> string "302360Z") "test" "302360Z"
Right "302360Z"