@@ -15,5 +15,9 @@ dayFunctions = HS.fromList [
15 AtomFunction { atomFuncName = "fromGregorian",
15 AtomFunction { atomFuncName = "fromGregorian",
16 atomFuncType = [intAtomType, intAtomType, intAtomType, dayAtomType],
16 atomFuncType = [intAtomType, intAtomType, intAtomType, dayAtomType],
17 atomFunc = \(year:month:day:_) -> ConstructedAtom "Day" dayAtomType [Atom (fromGregorian (fromIntegral (unsafeCast year::Int)) (unsafeCast month) (unsafeCast day))]
17 atomFunc = \(year:month:day:_) -> ConstructedAtom "Day" dayAtomType [Atom (fromGregorian (fromIntegral (unsafeCast year::Int)) (unsafeCast month) (unsafeCast day))]
19+ AtomFunction { atomFuncName = "dayEarlierThan",
20+ atomFuncType = [dayAtomType, dayAtomType, boolAtomType],
21+ atomFunc = \((ConstructedAtom _ _ (dayA:_)):(ConstructedAtom _ _ (dayB:_)):_) -> Atom (unsafeCast dayA < (unsafeCast dayB :: Day))