1module TutorialD.Interpreter.DataTypes.Interval where
3import Text.Parsec.String
5import ProjectM36.DataTypes.Interval ()
6import TutorialD.Interpreter.Base
7import TutorialD.Interpreter.DataTypes.DateTime
11intervalP :: (Ord a) => Parser (Extended a) -> Parser (Interval a)
13 lBoundClosed <- string "(" *> return False <|>
14 string "[" *> return True
19 uBoundClosed <- string ")" *> return False <|>
20 string "]" *> return True
22 return $ interval (lBound, lBoundClosed) (uBound, uBoundClosed)
24intervalDateTimeUnitP :: Parser (Extended UTCTime)
25intervalDateTimeUnitP = Finite <$> dateTimeStringP <|>
26 (reserved "inf" *> return PosInf) <|>
27 (reserved "-inf" *> return NegInf)
29intervalDateTimeAtomP :: Parser Atom
30intervalDateTimeAtomP = do
31 reserved "interval_datetime("
32 intv <- intervalP intervalDateTimeUnitP
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