1{-# LANGUAGE GeneralizedNewtypeDeriving, StandaloneDeriving #-}
2{-# OPTIONS_GHC -fno-warn-orphans #-}
3module ProjectM36.DataTypes.Interval where
5import ProjectM36.Base hiding (Finite)
11instance (Atomable a, Ord a) => Atomable (Interval a)
13instance (Binary a) => Binary (Extended a) where
15 NegInf -> put (1 :: Int)
16 PosInf -> put (2 :: Int)
17 Finite x -> put (3 :: Int) >> put x
19 flag <- get :: Get Int
26instance (Ord a, Binary a) => Binary (Interval a) where
27 put interv = put (lowerBound interv) >> put (upperBound interv)
28 get = interval <$> get <*> get
30intervalFunctions :: [AtomFunction]
31intervalFunctions = [AtomFunction { atomFuncName = "interval_dt_member",
32 atomFuncType = [dateTimeAtomType,
33 atomTypeForProxy (Proxy :: Proxy (Interval UTCTime)),
35 atomFunc = (\(dt:dtinterval:_) -> Atom $ member ((unsafeCast dt)::UTCTime) ((unsafeCast dtinterval)::(Interval UTCTime)))}
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