1module ProjectM36.DataTypes.Day where
3import ProjectM36.AtomFunctionBody
4import qualified Data.HashSet as HS
5import Data.Time.Calendar
7dayAtomFunctions :: AtomFunctions
8dayAtomFunctions = HS.fromList [
9 AtomFunction { atomFuncName = "fromGregorian",
10 atomFuncType = [IntegerAtomType, IntegerAtomType, IntegerAtomType, DayAtomType],
11 atomFuncBody = compiledAtomFunctionBody $ \(IntegerAtom year:IntegerAtom month:IntegerAtom day:_) -> pure $ DayAtom (fromGregorian (fromIntegral year) (fromIntegral month) (fromIntegral day))
13 AtomFunction { atomFuncName = "dayEarlierThan",
14 atomFuncType = [DayAtomType, DayAtomType, BoolAtomType],
15 atomFuncBody = compiledAtomFunctionBody $ \(ConstructedAtom _ _ (IntAtom dayA:_):ConstructedAtom _ _ (IntAtom dayB:_):_) -> pure (BoolAtom (dayA < dayB))
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list