Equations
- Parsec.count n p = List.mapM id (List.replicate n p)
Instances For
Equations
- Parsec.choice [] = Lean.Parsec.fail ""
- Parsec.choice [p] = p
- Parsec.choice (p :: ps) = HOrElse.hOrElse p.attempt fun (x : Unit) => Parsec.choice ps
Instances For
Equations
- Parsec.toNat chars = List.foldl (fun (acc : Nat) (c : Char) => 10 * acc + (c.val.toNat - '0'.val.toNat)) 0 chars
Instances For
Equations
- Parsec.nat n = do let __do_lift ← Parsec.count n Lean.Parsec.digit pure (Parsec.toNat __do_lift)
Instances For
Equations
- Parsec.digits n = do let __do_lift ← Parsec.count n Lean.Parsec.digit pure __do_lift.asString
Instances For
Equations
- Parsec.allowChar c = HOrElse.hOrElse ((fun (x : Char) => x.toString) <$> Lean.Parsec.pchar c) fun (x : Unit) => pure ""
Instances For
Equations
- Time.instMonadFailOption α = { fail := fun (x : String) => none }
Equations
- Time.instMonadFailParsec α = { fail := fun (s : String) (it : String.Iterator) => Lean.Parsec.ParseResult.error it s }
Equations
- Time.instReadMaybeString = { readMaybe := fun (s : String) => some s }
Equations
- Time.instReadMaybeInt = { readMaybe := fun (s : String) => s.toInt? }
- PrePadding: Time.PaddingSide
- PostPadding: Time.PaddingSide
Instances For
- ISOWeek: Time.WeekType
- SundayWeek: Time.WeekType
- MondayWeek: Time.WeekType
Instances For
Equations
- Time.instReprWeekType = { reprPrec := Time.reprWeekType✝ }
Equations
- Time.instBEqWeekType = { beq := Time.beqWeekType✝ }
- DCCentury: Int → Time.DayComponent
- DCCenturyYear: Int → Time.DayComponent
- DCYearMonth: Int → Time.DayComponent
- DCMonthDay: Int → Time.DayComponent
- DCYearDay: Int → Time.DayComponent
- DCWeekDay: Int → Time.DayComponent
- DCYearWeek: Time.WeekType → Int → Time.DayComponent
Instances For
Equations
- Time.instReprDayComponent = { reprPrec := Time.reprDayComponent✝ }
Equations
- Time.instBEqDayComponent = { beq := Time.beqDayComponent✝ }
Equations
- Time.DCCentury? x = match x with | Time.DayComponent.DCCentury y => some y | x => none
Instances For
Equations
- Time.DCCenturyYear? x = match x with | Time.DayComponent.DCCenturyYear y => some y | x => none
Instances For
Equations
- Time.DCYearMonth? x = match x with | Time.DayComponent.DCYearMonth y => some y | x => none
Instances For
Equations
- Time.DCMonthDay? x = match x with | Time.DayComponent.DCMonthDay y => some y | x => none
Instances For
Equations
- Time.DCYearDay? x = match x with | Time.DayComponent.DCYearDay y => some y | x => none
Instances For
Equations
- Time.DCWeekDay? x = match x with | Time.DayComponent.DCWeekDay y => some y | x => none
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Time.allowEmptyParser x = match x with | false => do let x ← Lean.Parsec.digit.many1 pure x.toList.asString | true => do let x ← Lean.Parsec.digit.many pure x.toList.asString
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Time.timeParseTimeSpecifier
(l : Time.TimeLocale)
(mpad : Option Time.ParseNumericPadding)
(s : Time.Specifier)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Time.timeParseTimeSpecifier.digits'
(mpad : Option Time.ParseNumericPadding)
(ps : Time.PaddingSide)
(pad : Time.ParseNumericPadding)
(allowEmpty : Bool)
(n : Nat)
:
Equations
- Time.timeParseTimeSpecifier.digits' mpad ps pad allowEmpty n = Time.parsePaddedDigits ps (mpad.getD pad) allowEmpty n
Instances For
def
Time.timeParseTimeSpecifier.digits
(mpad : Option Time.ParseNumericPadding)
(pad : Time.ParseNumericPadding)
(n : Nat)
:
Equations
- Time.timeParseTimeSpecifier.digits mpad pad n = Time.timeParseTimeSpecifier.digits' mpad Time.PaddingSide.PrePadding pad false n
Instances For
def
Time.timeParseTimeSpecifier.allowNegativeDigits
(mpad : Option Time.ParseNumericPadding)
(pad : Time.ParseNumericPadding)
(n : Nat)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Time.timeParseTimeSpecifier.oneOf l = Parsec.choice (List.map (fun (x : String) => Lean.Parsec.pstring x) l)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Time.makeDayComponent.indexOf? p l = match List.find? (fun (x : Nat × α) => p x.snd) l.enum with | some (i, snd) => some ↑i | x => none
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Time.makeDayComponents.flatten l = List.foldr (fun (c acc : List α) => c ++ acc) [] l
Instances For
Equations
- Time.safeLast a l = (a :: l).getLast ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Time.instParseTimeDay.rest x (Time.DayComponent.DCYearMonth m :: tail) = let md := Time.safeLast 1 (List.filterMap Time.DCMonthDay? x); Time.fromGregorianValid (Time.instParseTimeDay.year x) m md
- Time.instParseTimeDay.rest x (Time.DayComponent.DCYearDay yd :: tail) = Time.fromOrdinalDateValid (Time.instParseTimeDay.year x) yd
- Time.instParseTimeDay.rest x (head :: xs) = Time.instParseTimeDay.rest x xs
- Time.instParseTimeDay.rest x [] = none
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- Time.readTzOffset s = match s.toList with | [s, h1, h2, m1, m2] => Time.readTzOffset.calculate s h1 h2 m1 m2 | x => none
Instances For
Equations
- Time.readTzOffset.getSign x = match x with | '+' => some 1 | '-' => some (-1) | x => none
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.