{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GLib.Structs.Date
(
Date(..) ,
newZeroDate ,
#if defined(ENABLE_OVERLOADING)
ResolveDateMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DateAddDaysMethodInfo ,
#endif
dateAddDays ,
#if defined(ENABLE_OVERLOADING)
DateAddMonthsMethodInfo ,
#endif
dateAddMonths ,
#if defined(ENABLE_OVERLOADING)
DateAddYearsMethodInfo ,
#endif
dateAddYears ,
#if defined(ENABLE_OVERLOADING)
DateClampMethodInfo ,
#endif
dateClamp ,
#if defined(ENABLE_OVERLOADING)
DateClearMethodInfo ,
#endif
dateClear ,
#if defined(ENABLE_OVERLOADING)
DateCompareMethodInfo ,
#endif
dateCompare ,
#if defined(ENABLE_OVERLOADING)
DateCopyMethodInfo ,
#endif
dateCopy ,
#if defined(ENABLE_OVERLOADING)
DateDaysBetweenMethodInfo ,
#endif
dateDaysBetween ,
#if defined(ENABLE_OVERLOADING)
DateFreeMethodInfo ,
#endif
dateFree ,
#if defined(ENABLE_OVERLOADING)
DateGetDayMethodInfo ,
#endif
dateGetDay ,
#if defined(ENABLE_OVERLOADING)
DateGetDayOfYearMethodInfo ,
#endif
dateGetDayOfYear ,
dateGetDaysInMonth ,
#if defined(ENABLE_OVERLOADING)
DateGetIso8601WeekOfYearMethodInfo ,
#endif
dateGetIso8601WeekOfYear ,
#if defined(ENABLE_OVERLOADING)
DateGetJulianMethodInfo ,
#endif
dateGetJulian ,
#if defined(ENABLE_OVERLOADING)
DateGetMondayWeekOfYearMethodInfo ,
#endif
dateGetMondayWeekOfYear ,
dateGetMondayWeeksInYear ,
#if defined(ENABLE_OVERLOADING)
DateGetMonthMethodInfo ,
#endif
dateGetMonth ,
#if defined(ENABLE_OVERLOADING)
DateGetSundayWeekOfYearMethodInfo ,
#endif
dateGetSundayWeekOfYear ,
dateGetSundayWeeksInYear ,
#if defined(ENABLE_OVERLOADING)
DateGetWeekOfYearMethodInfo ,
#endif
dateGetWeekOfYear ,
#if defined(ENABLE_OVERLOADING)
DateGetWeekdayMethodInfo ,
#endif
dateGetWeekday ,
dateGetWeeksInYear ,
#if defined(ENABLE_OVERLOADING)
DateGetYearMethodInfo ,
#endif
dateGetYear ,
#if defined(ENABLE_OVERLOADING)
DateIsFirstOfMonthMethodInfo ,
#endif
dateIsFirstOfMonth ,
#if defined(ENABLE_OVERLOADING)
DateIsLastOfMonthMethodInfo ,
#endif
dateIsLastOfMonth ,
dateIsLeapYear ,
dateNew ,
dateNewDmy ,
dateNewJulian ,
#if defined(ENABLE_OVERLOADING)
DateOrderMethodInfo ,
#endif
dateOrder ,
#if defined(ENABLE_OVERLOADING)
DateSetDayMethodInfo ,
#endif
dateSetDay ,
#if defined(ENABLE_OVERLOADING)
DateSetDmyMethodInfo ,
#endif
dateSetDmy ,
#if defined(ENABLE_OVERLOADING)
DateSetJulianMethodInfo ,
#endif
dateSetJulian ,
#if defined(ENABLE_OVERLOADING)
DateSetMonthMethodInfo ,
#endif
dateSetMonth ,
#if defined(ENABLE_OVERLOADING)
DateSetParseMethodInfo ,
#endif
dateSetParse ,
#if defined(ENABLE_OVERLOADING)
DateSetTimeMethodInfo ,
#endif
dateSetTime ,
#if defined(ENABLE_OVERLOADING)
DateSetTimeTMethodInfo ,
#endif
dateSetTimeT ,
#if defined(ENABLE_OVERLOADING)
DateSetTimeValMethodInfo ,
#endif
dateSetTimeVal ,
#if defined(ENABLE_OVERLOADING)
DateSetYearMethodInfo ,
#endif
dateSetYear ,
dateStrftime ,
#if defined(ENABLE_OVERLOADING)
DateSubtractDaysMethodInfo ,
#endif
dateSubtractDays ,
#if defined(ENABLE_OVERLOADING)
DateSubtractMonthsMethodInfo ,
#endif
dateSubtractMonths ,
#if defined(ENABLE_OVERLOADING)
DateSubtractYearsMethodInfo ,
#endif
dateSubtractYears ,
#if defined(ENABLE_OVERLOADING)
DateToStructTmMethodInfo ,
#endif
dateToStructTm ,
#if defined(ENABLE_OVERLOADING)
DateValidMethodInfo ,
#endif
dateValid ,
dateValidDay ,
dateValidDmy ,
dateValidJulian ,
dateValidMonth ,
dateValidWeekday ,
dateValidYear ,
#if defined(ENABLE_OVERLOADING)
date_day ,
#endif
getDateDay ,
setDateDay ,
#if defined(ENABLE_OVERLOADING)
date_dmy ,
#endif
getDateDmy ,
setDateDmy ,
#if defined(ENABLE_OVERLOADING)
date_julian ,
#endif
getDateJulian ,
setDateJulian ,
#if defined(ENABLE_OVERLOADING)
date_julianDays ,
#endif
getDateJulianDays ,
setDateJulianDays ,
#if defined(ENABLE_OVERLOADING)
date_month ,
#endif
getDateMonth ,
setDateMonth ,
#if defined(ENABLE_OVERLOADING)
date_year ,
#endif
getDateYear ,
setDateYear ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified Data.Bits as DB
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import {-# SOURCE #-} qualified GI.GLib.Enums as GLib.Enums
import {-# SOURCE #-} qualified GI.GLib.Structs.TimeVal as GLib.TimeVal
#else
import {-# SOURCE #-} qualified GI.GLib.Enums as GLib.Enums
import {-# SOURCE #-} qualified GI.GLib.Structs.TimeVal as GLib.TimeVal
#endif
newtype Date = Date (SP.ManagedPtr Date)
deriving (Date -> Date -> Bool
(Date -> Date -> Bool) -> (Date -> Date -> Bool) -> Eq Date
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Date -> Date -> Bool
== :: Date -> Date -> Bool
$c/= :: Date -> Date -> Bool
/= :: Date -> Date -> Bool
Eq)
instance SP.ManagedPtrNewtype Date where
toManagedPtr :: Date -> ManagedPtr Date
toManagedPtr (Date ManagedPtr Date
p) = ManagedPtr Date
p
foreign import ccall "g_date_get_type" c_g_date_get_type ::
IO GType
type instance O.ParentTypes Date = '[]
instance O.HasParentTypes Date
instance B.Types.TypedObject Date where
glibType :: IO GType
glibType = IO GType
c_g_date_get_type
instance B.Types.GBoxed Date
instance B.GValue.IsGValue (Maybe Date) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_date_get_type
gvalueSet_ :: Ptr GValue -> Maybe Date -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Date
P.Nothing = Ptr GValue -> Ptr Date -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr Date
forall a. Ptr a
FP.nullPtr :: FP.Ptr Date)
gvalueSet_ Ptr GValue
gv (P.Just Date
obj) = Date -> (Ptr Date -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Date
obj (Ptr GValue -> Ptr Date -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Date)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr Date)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr Date)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newBoxed Date ptr
else return P.Nothing
newZeroDate :: MonadIO m => m Date
newZeroDate :: forall (m :: * -> *). MonadIO m => m Date
newZeroDate = IO Date -> m Date
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Date -> m Date) -> IO Date -> m Date
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr Date)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
8 IO (Ptr Date) -> (Ptr Date -> IO Date) -> IO Date
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr Date -> Date) -> Ptr Date -> IO Date
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Date -> Date
Date
instance tag ~ 'AttrSet => Constructible Date tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr Date -> Date) -> [AttrOp Date tag] -> m Date
new ManagedPtr Date -> Date
_ [AttrOp Date tag]
attrs = do
o <- m Date
forall (m :: * -> *). MonadIO m => m Date
newZeroDate
GI.Attributes.set o attrs
return o
getDateJulianDays :: MonadIO m => Date -> m Word32
getDateJulianDays :: forall (m :: * -> *). MonadIO m => Date -> m Word32
getDateJulianDays Date
s = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ Date -> (Ptr Date -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Date
s ((Ptr Date -> IO Word32) -> IO Word32)
-> (Ptr Date -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr Date
ptr -> do
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Date
ptr Ptr Date -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO Word32
let bitfield = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftR (Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL Word32
val (Word32 -> Int
forall b. FiniteBits b => b -> Int
DB.finiteBitSize Word32
val Int -> Int -> Int
forall a. Num a => a -> a -> a
P.- Int
32)) (Word32 -> Int
forall b. FiniteBits b => b -> Int
DB.finiteBitSize Word32
val Int -> Int -> Int
forall a. Num a => a -> a -> a
P.- Int
32)
return bitfield
setDateJulianDays :: MonadIO m => Date -> Word32 -> m ()
setDateJulianDays :: forall (m :: * -> *). MonadIO m => Date -> Word32 -> m ()
setDateJulianDays Date
s Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Date -> (Ptr Date -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Date
s ((Ptr Date -> IO ()) -> IO ()) -> (Ptr Date -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Date
ptr -> do
old <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Date
ptr Ptr Date -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO (Word32)
let mask = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL (Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL Word32
1 Int
32 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
P.- Word32
1) Int
0 :: Word32
poke (ptr `plusPtr` 0) ((old DB..&. DB.complement mask) DB..|. (DB.shiftL (val :: Word32) 0 DB..&. mask))
#if defined(ENABLE_OVERLOADING)
data DateJulianDaysFieldInfo
instance AttrInfo DateJulianDaysFieldInfo where
type AttrBaseTypeConstraint DateJulianDaysFieldInfo = (~) Date
type AttrAllowedOps DateJulianDaysFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DateJulianDaysFieldInfo = (~) Word32
type AttrTransferTypeConstraint DateJulianDaysFieldInfo = (~)Word32
type AttrTransferType DateJulianDaysFieldInfo = Word32
type AttrGetType DateJulianDaysFieldInfo = Word32
type AttrLabel DateJulianDaysFieldInfo = "julian_days"
type AttrOrigin DateJulianDaysFieldInfo = Date
attrGet :: forall o.
AttrBaseTypeConstraint DateJulianDaysFieldInfo o =>
o -> IO (AttrGetType DateJulianDaysFieldInfo)
attrGet = o -> IO (AttrGetType DateJulianDaysFieldInfo)
Date -> IO Word32
forall (m :: * -> *). MonadIO m => Date -> m Word32
getDateJulianDays
attrSet :: forall o b.
(AttrBaseTypeConstraint DateJulianDaysFieldInfo o,
AttrSetTypeConstraint DateJulianDaysFieldInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
Date -> Word32 -> IO ()
forall (m :: * -> *). MonadIO m => Date -> Word32 -> m ()
setDateJulianDays
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DateJulianDaysFieldInfo o,
AttrSetTypeConstraint DateJulianDaysFieldInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint DateJulianDaysFieldInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DateJulianDaysFieldInfo o,
AttrTransferTypeConstraint DateJulianDaysFieldInfo b) =>
Proxy o -> b -> IO (AttrTransferType DateJulianDaysFieldInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.julianDays"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#g:attr:julianDays"
})
date_julianDays :: AttrLabelProxy "julianDays"
date_julianDays :: AttrLabelProxy "julianDays"
date_julianDays = AttrLabelProxy "julianDays"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
#endif
getDateJulian :: MonadIO m => Date -> m Word32
getDateJulian :: forall (m :: * -> *). MonadIO m => Date -> m Word32
getDateJulian Date
s = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ Date -> (Ptr Date -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Date
s ((Ptr Date -> IO Word32) -> IO Word32)
-> (Ptr Date -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr Date
ptr -> do
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Date
ptr Ptr Date -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO Word32
let bitfield = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftR (Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL Word32
val (Word32 -> Int
forall b. FiniteBits b => b -> Int
DB.finiteBitSize Word32
val Int -> Int -> Int
forall a. Num a => a -> a -> a
P.- Int
1)) (Word32 -> Int
forall b. FiniteBits b => b -> Int
DB.finiteBitSize Word32
val Int -> Int -> Int
forall a. Num a => a -> a -> a
P.- Int
1)
return bitfield
setDateJulian :: MonadIO m => Date -> Word32 -> m ()
setDateJulian :: forall (m :: * -> *). MonadIO m => Date -> Word32 -> m ()
setDateJulian Date
s Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Date -> (Ptr Date -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Date
s ((Ptr Date -> IO ()) -> IO ()) -> (Ptr Date -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Date
ptr -> do
old <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Date
ptr Ptr Date -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO (Word32)
let mask = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL (Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL Word32
1 Int
1 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
P.- Word32
1) Int
0 :: Word32
poke (ptr `plusPtr` 4) ((old DB..&. DB.complement mask) DB..|. (DB.shiftL (val :: Word32) 0 DB..&. mask))
#if defined(ENABLE_OVERLOADING)
data DateJulianFieldInfo
instance AttrInfo DateJulianFieldInfo where
type AttrBaseTypeConstraint DateJulianFieldInfo = (~) Date
type AttrAllowedOps DateJulianFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DateJulianFieldInfo = (~) Word32
type AttrTransferTypeConstraint DateJulianFieldInfo = (~)Word32
type AttrTransferType DateJulianFieldInfo = Word32
type AttrGetType DateJulianFieldInfo = Word32
type AttrLabel DateJulianFieldInfo = "julian"
type AttrOrigin DateJulianFieldInfo = Date
attrGet :: forall o.
AttrBaseTypeConstraint DateJulianFieldInfo o =>
o -> IO (AttrGetType DateJulianFieldInfo)
attrGet = o -> IO (AttrGetType DateJulianFieldInfo)
Date -> IO Word32
forall (m :: * -> *). MonadIO m => Date -> m Word32
getDateJulian
attrSet :: forall o b.
(AttrBaseTypeConstraint DateJulianFieldInfo o,
AttrSetTypeConstraint DateJulianFieldInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
Date -> Word32 -> IO ()
forall (m :: * -> *). MonadIO m => Date -> Word32 -> m ()
setDateJulian
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DateJulianFieldInfo o,
AttrSetTypeConstraint DateJulianFieldInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint DateJulianFieldInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DateJulianFieldInfo o,
AttrTransferTypeConstraint DateJulianFieldInfo b) =>
Proxy o -> b -> IO (AttrTransferType DateJulianFieldInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.julian"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#g:attr:julian"
})
date_julian :: AttrLabelProxy "julian"
date_julian :: AttrLabelProxy "julian"
date_julian = AttrLabelProxy "julian"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
#endif
getDateDmy :: MonadIO m => Date -> m Word32
getDateDmy :: forall (m :: * -> *). MonadIO m => Date -> m Word32
getDateDmy Date
s = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ Date -> (Ptr Date -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Date
s ((Ptr Date -> IO Word32) -> IO Word32)
-> (Ptr Date -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr Date
ptr -> do
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Date
ptr Ptr Date -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO Word32
let bitfield = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftR (Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL Word32
val (Word32 -> Int
forall b. FiniteBits b => b -> Int
DB.finiteBitSize Word32
val Int -> Int -> Int
forall a. Num a => a -> a -> a
P.- Int
2)) (Word32 -> Int
forall b. FiniteBits b => b -> Int
DB.finiteBitSize Word32
val Int -> Int -> Int
forall a. Num a => a -> a -> a
P.- Int
1)
return bitfield
setDateDmy :: MonadIO m => Date -> Word32 -> m ()
setDateDmy :: forall (m :: * -> *). MonadIO m => Date -> Word32 -> m ()
setDateDmy Date
s Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Date -> (Ptr Date -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Date
s ((Ptr Date -> IO ()) -> IO ()) -> (Ptr Date -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Date
ptr -> do
old <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Date
ptr Ptr Date -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO (Word32)
let mask = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL (Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL Word32
1 Int
1 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
P.- Word32
1) Int
1 :: Word32
poke (ptr `plusPtr` 4) ((old DB..&. DB.complement mask) DB..|. (DB.shiftL (val :: Word32) 1 DB..&. mask))
#if defined(ENABLE_OVERLOADING)
data DateDmyFieldInfo
instance AttrInfo DateDmyFieldInfo where
type AttrBaseTypeConstraint DateDmyFieldInfo = (~) Date
type AttrAllowedOps DateDmyFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DateDmyFieldInfo = (~) Word32
type AttrTransferTypeConstraint DateDmyFieldInfo = (~)Word32
type AttrTransferType DateDmyFieldInfo = Word32
type AttrGetType DateDmyFieldInfo = Word32
type AttrLabel DateDmyFieldInfo = "dmy"
type AttrOrigin DateDmyFieldInfo = Date
attrGet :: forall o.
AttrBaseTypeConstraint DateDmyFieldInfo o =>
o -> IO (AttrGetType DateDmyFieldInfo)
attrGet = o -> IO (AttrGetType DateDmyFieldInfo)
Date -> IO Word32
forall (m :: * -> *). MonadIO m => Date -> m Word32
getDateDmy
attrSet :: forall o b.
(AttrBaseTypeConstraint DateDmyFieldInfo o,
AttrSetTypeConstraint DateDmyFieldInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
Date -> Word32 -> IO ()
forall (m :: * -> *). MonadIO m => Date -> Word32 -> m ()
setDateDmy
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DateDmyFieldInfo o,
AttrSetTypeConstraint DateDmyFieldInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o. AttrBaseTypeConstraint DateDmyFieldInfo o => o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DateDmyFieldInfo o,
AttrTransferTypeConstraint DateDmyFieldInfo b) =>
Proxy o -> b -> IO (AttrTransferType DateDmyFieldInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dmy"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#g:attr:dmy"
})
date_dmy :: AttrLabelProxy "dmy"
date_dmy :: AttrLabelProxy "dmy"
date_dmy = AttrLabelProxy "dmy"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
#endif
getDateDay :: MonadIO m => Date -> m Word32
getDateDay :: forall (m :: * -> *). MonadIO m => Date -> m Word32
getDateDay Date
s = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ Date -> (Ptr Date -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Date
s ((Ptr Date -> IO Word32) -> IO Word32)
-> (Ptr Date -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr Date
ptr -> do
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Date
ptr Ptr Date -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO Word32
let bitfield = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftR (Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL Word32
val (Word32 -> Int
forall b. FiniteBits b => b -> Int
DB.finiteBitSize Word32
val Int -> Int -> Int
forall a. Num a => a -> a -> a
P.- Int
8)) (Word32 -> Int
forall b. FiniteBits b => b -> Int
DB.finiteBitSize Word32
val Int -> Int -> Int
forall a. Num a => a -> a -> a
P.- Int
6)
return bitfield
setDateDay :: MonadIO m => Date -> Word32 -> m ()
setDateDay :: forall (m :: * -> *). MonadIO m => Date -> Word32 -> m ()
setDateDay Date
s Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Date -> (Ptr Date -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Date
s ((Ptr Date -> IO ()) -> IO ()) -> (Ptr Date -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Date
ptr -> do
old <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Date
ptr Ptr Date -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO (Word32)
let mask = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL (Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL Word32
1 Int
6 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
P.- Word32
1) Int
2 :: Word32
poke (ptr `plusPtr` 4) ((old DB..&. DB.complement mask) DB..|. (DB.shiftL (val :: Word32) 2 DB..&. mask))
#if defined(ENABLE_OVERLOADING)
data DateDayFieldInfo
instance AttrInfo DateDayFieldInfo where
type AttrBaseTypeConstraint DateDayFieldInfo = (~) Date
type AttrAllowedOps DateDayFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DateDayFieldInfo = (~) Word32
type AttrTransferTypeConstraint DateDayFieldInfo = (~)Word32
type AttrTransferType DateDayFieldInfo = Word32
type AttrGetType DateDayFieldInfo = Word32
type AttrLabel DateDayFieldInfo = "day"
type AttrOrigin DateDayFieldInfo = Date
attrGet :: forall o.
AttrBaseTypeConstraint DateDayFieldInfo o =>
o -> IO (AttrGetType DateDayFieldInfo)
attrGet = o -> IO (AttrGetType DateDayFieldInfo)
Date -> IO Word32
forall (m :: * -> *). MonadIO m => Date -> m Word32
getDateDay
attrSet :: forall o b.
(AttrBaseTypeConstraint DateDayFieldInfo o,
AttrSetTypeConstraint DateDayFieldInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
Date -> Word32 -> IO ()
forall (m :: * -> *). MonadIO m => Date -> Word32 -> m ()
setDateDay
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DateDayFieldInfo o,
AttrSetTypeConstraint DateDayFieldInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o. AttrBaseTypeConstraint DateDayFieldInfo o => o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DateDayFieldInfo o,
AttrTransferTypeConstraint DateDayFieldInfo b) =>
Proxy o -> b -> IO (AttrTransferType DateDayFieldInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.day"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#g:attr:day"
})
date_day :: AttrLabelProxy "day"
date_day :: AttrLabelProxy "day"
date_day = AttrLabelProxy "day"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
#endif
getDateMonth :: MonadIO m => Date -> m Word32
getDateMonth :: forall (m :: * -> *). MonadIO m => Date -> m Word32
getDateMonth Date
s = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ Date -> (Ptr Date -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Date
s ((Ptr Date -> IO Word32) -> IO Word32)
-> (Ptr Date -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr Date
ptr -> do
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Date
ptr Ptr Date -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO Word32
let bitfield = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftR (Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL Word32
val (Word32 -> Int
forall b. FiniteBits b => b -> Int
DB.finiteBitSize Word32
val Int -> Int -> Int
forall a. Num a => a -> a -> a
P.- Int
12)) (Word32 -> Int
forall b. FiniteBits b => b -> Int
DB.finiteBitSize Word32
val Int -> Int -> Int
forall a. Num a => a -> a -> a
P.- Int
4)
return bitfield
setDateMonth :: MonadIO m => Date -> Word32 -> m ()
setDateMonth :: forall (m :: * -> *). MonadIO m => Date -> Word32 -> m ()
setDateMonth Date
s Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Date -> (Ptr Date -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Date
s ((Ptr Date -> IO ()) -> IO ()) -> (Ptr Date -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Date
ptr -> do
old <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Date
ptr Ptr Date -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO (Word32)
let mask = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL (Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL Word32
1 Int
4 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
P.- Word32
1) Int
8 :: Word32
poke (ptr `plusPtr` 4) ((old DB..&. DB.complement mask) DB..|. (DB.shiftL (val :: Word32) 8 DB..&. mask))
#if defined(ENABLE_OVERLOADING)
data DateMonthFieldInfo
instance AttrInfo DateMonthFieldInfo where
type AttrBaseTypeConstraint DateMonthFieldInfo = (~) Date
type AttrAllowedOps DateMonthFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DateMonthFieldInfo = (~) Word32
type AttrTransferTypeConstraint DateMonthFieldInfo = (~)Word32
type AttrTransferType DateMonthFieldInfo = Word32
type AttrGetType DateMonthFieldInfo = Word32
type AttrLabel DateMonthFieldInfo = "month"
type AttrOrigin DateMonthFieldInfo = Date
attrGet :: forall o.
AttrBaseTypeConstraint DateMonthFieldInfo o =>
o -> IO (AttrGetType DateMonthFieldInfo)
attrGet = o -> IO (AttrGetType DateMonthFieldInfo)
Date -> IO Word32
forall (m :: * -> *). MonadIO m => Date -> m Word32
getDateMonth
attrSet :: forall o b.
(AttrBaseTypeConstraint DateMonthFieldInfo o,
AttrSetTypeConstraint DateMonthFieldInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
Date -> Word32 -> IO ()
forall (m :: * -> *). MonadIO m => Date -> Word32 -> m ()
setDateMonth
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DateMonthFieldInfo o,
AttrSetTypeConstraint DateMonthFieldInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o. AttrBaseTypeConstraint DateMonthFieldInfo o => o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DateMonthFieldInfo o,
AttrTransferTypeConstraint DateMonthFieldInfo b) =>
Proxy o -> b -> IO (AttrTransferType DateMonthFieldInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.month"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#g:attr:month"
})
date_month :: AttrLabelProxy "month"
date_month :: AttrLabelProxy "month"
date_month = AttrLabelProxy "month"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
#endif
getDateYear :: MonadIO m => Date -> m Word32
getDateYear :: forall (m :: * -> *). MonadIO m => Date -> m Word32
getDateYear Date
s = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ Date -> (Ptr Date -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Date
s ((Ptr Date -> IO Word32) -> IO Word32)
-> (Ptr Date -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr Date
ptr -> do
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Date
ptr Ptr Date -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO Word32
let bitfield = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftR (Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL Word32
val (Word32 -> Int
forall b. FiniteBits b => b -> Int
DB.finiteBitSize Word32
val Int -> Int -> Int
forall a. Num a => a -> a -> a
P.- Int
28)) (Word32 -> Int
forall b. FiniteBits b => b -> Int
DB.finiteBitSize Word32
val Int -> Int -> Int
forall a. Num a => a -> a -> a
P.- Int
16)
return bitfield
setDateYear :: MonadIO m => Date -> Word32 -> m ()
setDateYear :: forall (m :: * -> *). MonadIO m => Date -> Word32 -> m ()
setDateYear Date
s Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Date -> (Ptr Date -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Date
s ((Ptr Date -> IO ()) -> IO ()) -> (Ptr Date -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Date
ptr -> do
old <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Date
ptr Ptr Date -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO (Word32)
let mask = Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL (Word32 -> Int -> Word32
forall a. Bits a => a -> Int -> a
DB.shiftL Word32
1 Int
16 Word32 -> Word32 -> Word32
forall a. Num a => a -> a -> a
P.- Word32
1) Int
12 :: Word32
poke (ptr `plusPtr` 4) ((old DB..&. DB.complement mask) DB..|. (DB.shiftL (val :: Word32) 12 DB..&. mask))
#if defined(ENABLE_OVERLOADING)
data DateYearFieldInfo
instance AttrInfo DateYearFieldInfo where
type AttrBaseTypeConstraint DateYearFieldInfo = (~) Date
type AttrAllowedOps DateYearFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DateYearFieldInfo = (~) Word32
type AttrTransferTypeConstraint DateYearFieldInfo = (~)Word32
type AttrTransferType DateYearFieldInfo = Word32
type AttrGetType DateYearFieldInfo = Word32
type AttrLabel DateYearFieldInfo = "year"
type AttrOrigin DateYearFieldInfo = Date
attrGet :: forall o.
AttrBaseTypeConstraint DateYearFieldInfo o =>
o -> IO (AttrGetType DateYearFieldInfo)
attrGet = o -> IO (AttrGetType DateYearFieldInfo)
Date -> IO Word32
forall (m :: * -> *). MonadIO m => Date -> m Word32
getDateYear
attrSet :: forall o b.
(AttrBaseTypeConstraint DateYearFieldInfo o,
AttrSetTypeConstraint DateYearFieldInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
Date -> Word32 -> IO ()
forall (m :: * -> *). MonadIO m => Date -> Word32 -> m ()
setDateYear
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DateYearFieldInfo o,
AttrSetTypeConstraint DateYearFieldInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o. AttrBaseTypeConstraint DateYearFieldInfo o => o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DateYearFieldInfo o,
AttrTransferTypeConstraint DateYearFieldInfo b) =>
Proxy o -> b -> IO (AttrTransferType DateYearFieldInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.year"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#g:attr:year"
})
date_year :: AttrLabelProxy "year"
date_year :: AttrLabelProxy "year"
date_year = AttrLabelProxy "year"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Date
type instance O.AttributeList Date = DateAttributeList
type DateAttributeList = ('[ '("julianDays", DateJulianDaysFieldInfo), '("julian", DateJulianFieldInfo), '("dmy", DateDmyFieldInfo), '("day", DateDayFieldInfo), '("month", DateMonthFieldInfo), '("year", DateYearFieldInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_date_new" g_date_new ::
IO (Ptr Date)
dateNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Date
dateNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Date
dateNew = IO Date -> m Date
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Date -> m Date) -> IO Date -> m Date
forall a b. (a -> b) -> a -> b
$ do
result <- IO (Ptr Date)
g_date_new
checkUnexpectedReturnNULL "dateNew" result
result' <- (wrapBoxed Date) result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_new_dmy" g_date_new_dmy ::
Word8 ->
CUInt ->
Word16 ->
IO (Ptr Date)
dateNewDmy ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word8
-> GLib.Enums.DateMonth
-> Word16
-> m Date
dateNewDmy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Word8 -> DateMonth -> Word16 -> m Date
dateNewDmy Word8
day DateMonth
month Word16
year = IO Date -> m Date
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Date -> m Date) -> IO Date -> m Date
forall a b. (a -> b) -> a -> b
$ do
let month' :: CUInt
month' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DateMonth -> Int) -> DateMonth -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DateMonth -> Int
forall a. Enum a => a -> Int
fromEnum) DateMonth
month
result <- Word8 -> CUInt -> Word16 -> IO (Ptr Date)
g_date_new_dmy Word8
day CUInt
month' Word16
year
checkUnexpectedReturnNULL "dateNewDmy" result
result' <- (wrapBoxed Date) result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_new_julian" g_date_new_julian ::
Word32 ->
IO (Ptr Date)
dateNewJulian ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word32
-> m Date
dateNewJulian :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word32 -> m Date
dateNewJulian Word32
julianDay = IO Date -> m Date
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Date -> m Date) -> IO Date -> m Date
forall a b. (a -> b) -> a -> b
$ do
result <- Word32 -> IO (Ptr Date)
g_date_new_julian Word32
julianDay
checkUnexpectedReturnNULL "dateNewJulian" result
result' <- (wrapBoxed Date) result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_add_days" g_date_add_days ::
Ptr Date ->
Word32 ->
IO ()
dateAddDays ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Word32
-> m ()
dateAddDays :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateAddDays Date
date Word32
nDays = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_add_days date' nDays
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateAddDaysMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.OverloadedMethod DateAddDaysMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Word32 -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateAddDays
instance O.OverloadedMethodInfo DateAddDaysMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateAddDays",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateAddDays"
})
#endif
foreign import ccall "g_date_add_months" g_date_add_months ::
Ptr Date ->
Word32 ->
IO ()
dateAddMonths ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Word32
-> m ()
dateAddMonths :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateAddMonths Date
date Word32
nMonths = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_add_months date' nMonths
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateAddMonthsMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.OverloadedMethod DateAddMonthsMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Word32 -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateAddMonths
instance O.OverloadedMethodInfo DateAddMonthsMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateAddMonths",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateAddMonths"
})
#endif
foreign import ccall "g_date_add_years" g_date_add_years ::
Ptr Date ->
Word32 ->
IO ()
dateAddYears ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Word32
-> m ()
dateAddYears :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateAddYears Date
date Word32
nYears = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_add_years date' nYears
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateAddYearsMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.OverloadedMethod DateAddYearsMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Word32 -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateAddYears
instance O.OverloadedMethodInfo DateAddYearsMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateAddYears",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateAddYears"
})
#endif
foreign import ccall "g_date_clamp" g_date_clamp ::
Ptr Date ->
Ptr Date ->
Ptr Date ->
IO ()
dateClamp ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Date
-> Date
-> m ()
dateClamp :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Date -> Date -> m ()
dateClamp Date
date Date
minDate Date
maxDate = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
minDate' <- unsafeManagedPtrGetPtr minDate
maxDate' <- unsafeManagedPtrGetPtr maxDate
g_date_clamp date' minDate' maxDate'
touchManagedPtr date
touchManagedPtr minDate
touchManagedPtr maxDate
return ()
#if defined(ENABLE_OVERLOADING)
data DateClampMethodInfo
instance (signature ~ (Date -> Date -> m ()), MonadIO m) => O.OverloadedMethod DateClampMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Date -> Date -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Date -> Date -> m ()
dateClamp
instance O.OverloadedMethodInfo DateClampMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateClamp",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateClamp"
})
#endif
foreign import ccall "g_date_clear" g_date_clear ::
Ptr Date ->
Word32 ->
IO ()
dateClear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Word32
-> m ()
dateClear :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateClear Date
date Word32
nDates = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_clear date' nDates
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateClearMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.OverloadedMethod DateClearMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Word32 -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateClear
instance O.OverloadedMethodInfo DateClearMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateClear",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateClear"
})
#endif
foreign import ccall "g_date_compare" g_date_compare ::
Ptr Date ->
Ptr Date ->
IO Int32
dateCompare ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Date
-> m Int32
dateCompare :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Date -> m Int32
dateCompare Date
lhs Date
rhs = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
lhs' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
lhs
rhs' <- unsafeManagedPtrGetPtr rhs
result <- g_date_compare lhs' rhs'
touchManagedPtr lhs
touchManagedPtr rhs
return result
#if defined(ENABLE_OVERLOADING)
data DateCompareMethodInfo
instance (signature ~ (Date -> m Int32), MonadIO m) => O.OverloadedMethod DateCompareMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Date -> m Int32
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Date -> m Int32
dateCompare
instance O.OverloadedMethodInfo DateCompareMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateCompare",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateCompare"
})
#endif
foreign import ccall "g_date_copy" g_date_copy ::
Ptr Date ->
IO (Ptr Date)
dateCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m Date
dateCopy :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Date
dateCopy Date
date = IO Date -> m Date
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Date -> m Date) -> IO Date -> m Date
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_copy date'
checkUnexpectedReturnNULL "dateCopy" result
result' <- (wrapBoxed Date) result
touchManagedPtr date
return result'
#if defined(ENABLE_OVERLOADING)
data DateCopyMethodInfo
instance (signature ~ (m Date), MonadIO m) => O.OverloadedMethod DateCopyMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m Date
forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Date
dateCopy
instance O.OverloadedMethodInfo DateCopyMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateCopy",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateCopy"
})
#endif
foreign import ccall "g_date_days_between" g_date_days_between ::
Ptr Date ->
Ptr Date ->
IO Int32
dateDaysBetween ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Date
-> m Int32
dateDaysBetween :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Date -> m Int32
dateDaysBetween Date
date1 Date
date2 = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
date1' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date1
date2' <- unsafeManagedPtrGetPtr date2
result <- g_date_days_between date1' date2'
touchManagedPtr date1
touchManagedPtr date2
return result
#if defined(ENABLE_OVERLOADING)
data DateDaysBetweenMethodInfo
instance (signature ~ (Date -> m Int32), MonadIO m) => O.OverloadedMethod DateDaysBetweenMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Date -> m Int32
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Date -> m Int32
dateDaysBetween
instance O.OverloadedMethodInfo DateDaysBetweenMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateDaysBetween",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateDaysBetween"
})
#endif
foreign import ccall "g_date_free" g_date_free ::
Ptr Date ->
IO ()
dateFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m ()
dateFree :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m ()
dateFree Date
date = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_free date'
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod DateFreeMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m ()
forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m ()
dateFree
instance O.OverloadedMethodInfo DateFreeMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateFree",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateFree"
})
#endif
foreign import ccall "g_date_get_day" g_date_get_day ::
Ptr Date ->
IO Word8
dateGetDay ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m Word8
dateGetDay :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word8
dateGetDay Date
date = IO Word8 -> m Word8
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word8 -> m Word8) -> IO Word8 -> m Word8
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_get_day date'
touchManagedPtr date
return result
#if defined(ENABLE_OVERLOADING)
data DateGetDayMethodInfo
instance (signature ~ (m Word8), MonadIO m) => O.OverloadedMethod DateGetDayMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m Word8
forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word8
dateGetDay
instance O.OverloadedMethodInfo DateGetDayMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateGetDay",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateGetDay"
})
#endif
foreign import ccall "g_date_get_day_of_year" g_date_get_day_of_year ::
Ptr Date ->
IO Word32
dateGetDayOfYear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m Word32
dateGetDayOfYear :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word32
dateGetDayOfYear Date
date = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_get_day_of_year date'
touchManagedPtr date
return result
#if defined(ENABLE_OVERLOADING)
data DateGetDayOfYearMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.OverloadedMethod DateGetDayOfYearMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m Word32
forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word32
dateGetDayOfYear
instance O.OverloadedMethodInfo DateGetDayOfYearMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateGetDayOfYear",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateGetDayOfYear"
})
#endif
foreign import ccall "g_date_get_iso8601_week_of_year" g_date_get_iso8601_week_of_year ::
Ptr Date ->
IO Word32
dateGetIso8601WeekOfYear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m Word32
dateGetIso8601WeekOfYear :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word32
dateGetIso8601WeekOfYear Date
date = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_get_iso8601_week_of_year date'
touchManagedPtr date
return result
#if defined(ENABLE_OVERLOADING)
data DateGetIso8601WeekOfYearMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.OverloadedMethod DateGetIso8601WeekOfYearMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m Word32
forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word32
dateGetIso8601WeekOfYear
instance O.OverloadedMethodInfo DateGetIso8601WeekOfYearMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateGetIso8601WeekOfYear",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateGetIso8601WeekOfYear"
})
#endif
foreign import ccall "g_date_get_julian" g_date_get_julian ::
Ptr Date ->
IO Word32
dateGetJulian ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m Word32
dateGetJulian :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word32
dateGetJulian Date
date = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_get_julian date'
touchManagedPtr date
return result
#if defined(ENABLE_OVERLOADING)
data DateGetJulianMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.OverloadedMethod DateGetJulianMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m Word32
forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word32
dateGetJulian
instance O.OverloadedMethodInfo DateGetJulianMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateGetJulian",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateGetJulian"
})
#endif
foreign import ccall "g_date_get_monday_week_of_year" g_date_get_monday_week_of_year ::
Ptr Date ->
IO Word32
dateGetMondayWeekOfYear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m Word32
dateGetMondayWeekOfYear :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word32
dateGetMondayWeekOfYear Date
date = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_get_monday_week_of_year date'
touchManagedPtr date
return result
#if defined(ENABLE_OVERLOADING)
data DateGetMondayWeekOfYearMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.OverloadedMethod DateGetMondayWeekOfYearMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m Word32
forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word32
dateGetMondayWeekOfYear
instance O.OverloadedMethodInfo DateGetMondayWeekOfYearMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateGetMondayWeekOfYear",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateGetMondayWeekOfYear"
})
#endif
foreign import ccall "g_date_get_month" g_date_get_month ::
Ptr Date ->
IO CUInt
dateGetMonth ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m GLib.Enums.DateMonth
dateGetMonth :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> m DateMonth
dateGetMonth Date
date = IO DateMonth -> m DateMonth
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DateMonth -> m DateMonth) -> IO DateMonth -> m DateMonth
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_get_month date'
let result' = (Int -> DateMonth
forall a. Enum a => Int -> a
toEnum (Int -> DateMonth) -> (CUInt -> Int) -> CUInt -> DateMonth
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
touchManagedPtr date
return result'
#if defined(ENABLE_OVERLOADING)
data DateGetMonthMethodInfo
instance (signature ~ (m GLib.Enums.DateMonth), MonadIO m) => O.OverloadedMethod DateGetMonthMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m DateMonth
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> m DateMonth
dateGetMonth
instance O.OverloadedMethodInfo DateGetMonthMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateGetMonth",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateGetMonth"
})
#endif
foreign import ccall "g_date_get_sunday_week_of_year" g_date_get_sunday_week_of_year ::
Ptr Date ->
IO Word32
dateGetSundayWeekOfYear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m Word32
dateGetSundayWeekOfYear :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word32
dateGetSundayWeekOfYear Date
date = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_get_sunday_week_of_year date'
touchManagedPtr date
return result
#if defined(ENABLE_OVERLOADING)
data DateGetSundayWeekOfYearMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.OverloadedMethod DateGetSundayWeekOfYearMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m Word32
forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word32
dateGetSundayWeekOfYear
instance O.OverloadedMethodInfo DateGetSundayWeekOfYearMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateGetSundayWeekOfYear",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateGetSundayWeekOfYear"
})
#endif
foreign import ccall "g_date_get_week_of_year" g_date_get_week_of_year ::
Ptr Date ->
CUInt ->
IO Word32
dateGetWeekOfYear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> GLib.Enums.DateWeekday
-> m Word32
dateGetWeekOfYear :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> DateWeekday -> m Word32
dateGetWeekOfYear Date
date DateWeekday
firstDayOfWeek = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
let firstDayOfWeek' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DateWeekday -> Int) -> DateWeekday -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DateWeekday -> Int
forall a. Enum a => a -> Int
fromEnum) DateWeekday
firstDayOfWeek
result <- g_date_get_week_of_year date' firstDayOfWeek'
touchManagedPtr date
return result
#if defined(ENABLE_OVERLOADING)
data DateGetWeekOfYearMethodInfo
instance (signature ~ (GLib.Enums.DateWeekday -> m Word32), MonadIO m) => O.OverloadedMethod DateGetWeekOfYearMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> DateWeekday -> m Word32
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> DateWeekday -> m Word32
dateGetWeekOfYear
instance O.OverloadedMethodInfo DateGetWeekOfYearMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateGetWeekOfYear",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateGetWeekOfYear"
})
#endif
foreign import ccall "g_date_get_weekday" g_date_get_weekday ::
Ptr Date ->
IO CUInt
dateGetWeekday ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m GLib.Enums.DateWeekday
dateGetWeekday :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> m DateWeekday
dateGetWeekday Date
date = IO DateWeekday -> m DateWeekday
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DateWeekday -> m DateWeekday)
-> IO DateWeekday -> m DateWeekday
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_get_weekday date'
let result' = (Int -> DateWeekday
forall a. Enum a => Int -> a
toEnum (Int -> DateWeekday) -> (CUInt -> Int) -> CUInt -> DateWeekday
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
touchManagedPtr date
return result'
#if defined(ENABLE_OVERLOADING)
data DateGetWeekdayMethodInfo
instance (signature ~ (m GLib.Enums.DateWeekday), MonadIO m) => O.OverloadedMethod DateGetWeekdayMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m DateWeekday
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> m DateWeekday
dateGetWeekday
instance O.OverloadedMethodInfo DateGetWeekdayMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateGetWeekday",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateGetWeekday"
})
#endif
foreign import ccall "g_date_get_year" g_date_get_year ::
Ptr Date ->
IO Word16
dateGetYear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m Word16
dateGetYear :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word16
dateGetYear Date
date = IO Word16 -> m Word16
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word16 -> m Word16) -> IO Word16 -> m Word16
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_get_year date'
touchManagedPtr date
return result
#if defined(ENABLE_OVERLOADING)
data DateGetYearMethodInfo
instance (signature ~ (m Word16), MonadIO m) => O.OverloadedMethod DateGetYearMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m Word16
forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Word16
dateGetYear
instance O.OverloadedMethodInfo DateGetYearMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateGetYear",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateGetYear"
})
#endif
foreign import ccall "g_date_is_first_of_month" g_date_is_first_of_month ::
Ptr Date ->
IO CInt
dateIsFirstOfMonth ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m Bool
dateIsFirstOfMonth :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Bool
dateIsFirstOfMonth Date
date = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_is_first_of_month date'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr date
return result'
#if defined(ENABLE_OVERLOADING)
data DateIsFirstOfMonthMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod DateIsFirstOfMonthMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m Bool
forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Bool
dateIsFirstOfMonth
instance O.OverloadedMethodInfo DateIsFirstOfMonthMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateIsFirstOfMonth",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateIsFirstOfMonth"
})
#endif
foreign import ccall "g_date_is_last_of_month" g_date_is_last_of_month ::
Ptr Date ->
IO CInt
dateIsLastOfMonth ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m Bool
dateIsLastOfMonth :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Bool
dateIsLastOfMonth Date
date = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_is_last_of_month date'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr date
return result'
#if defined(ENABLE_OVERLOADING)
data DateIsLastOfMonthMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod DateIsLastOfMonthMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m Bool
forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Bool
dateIsLastOfMonth
instance O.OverloadedMethodInfo DateIsLastOfMonthMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateIsLastOfMonth",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateIsLastOfMonth"
})
#endif
foreign import ccall "g_date_order" g_date_order ::
Ptr Date ->
Ptr Date ->
IO ()
dateOrder ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Date
-> m ()
dateOrder :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Date -> m ()
dateOrder Date
date1 Date
date2 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date1' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date1
date2' <- unsafeManagedPtrGetPtr date2
g_date_order date1' date2'
touchManagedPtr date1
touchManagedPtr date2
return ()
#if defined(ENABLE_OVERLOADING)
data DateOrderMethodInfo
instance (signature ~ (Date -> m ()), MonadIO m) => O.OverloadedMethod DateOrderMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Date -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Date -> m ()
dateOrder
instance O.OverloadedMethodInfo DateOrderMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateOrder",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateOrder"
})
#endif
foreign import ccall "g_date_set_day" g_date_set_day ::
Ptr Date ->
Word8 ->
IO ()
dateSetDay ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Word8
-> m ()
dateSetDay :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word8 -> m ()
dateSetDay Date
date Word8
day = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_set_day date' day
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateSetDayMethodInfo
instance (signature ~ (Word8 -> m ()), MonadIO m) => O.OverloadedMethod DateSetDayMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Word8 -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word8 -> m ()
dateSetDay
instance O.OverloadedMethodInfo DateSetDayMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateSetDay",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateSetDay"
})
#endif
foreign import ccall "g_date_set_dmy" g_date_set_dmy ::
Ptr Date ->
Word8 ->
CUInt ->
Word16 ->
IO ()
dateSetDmy ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Word8
-> GLib.Enums.DateMonth
-> Word16
-> m ()
dateSetDmy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word8 -> DateMonth -> Word16 -> m ()
dateSetDmy Date
date Word8
day DateMonth
month Word16
y = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
let month' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DateMonth -> Int) -> DateMonth -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DateMonth -> Int
forall a. Enum a => a -> Int
fromEnum) DateMonth
month
g_date_set_dmy date' day month' y
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateSetDmyMethodInfo
instance (signature ~ (Word8 -> GLib.Enums.DateMonth -> Word16 -> m ()), MonadIO m) => O.OverloadedMethod DateSetDmyMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Word8 -> DateMonth -> Word16 -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word8 -> DateMonth -> Word16 -> m ()
dateSetDmy
instance O.OverloadedMethodInfo DateSetDmyMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateSetDmy",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateSetDmy"
})
#endif
foreign import ccall "g_date_set_julian" g_date_set_julian ::
Ptr Date ->
Word32 ->
IO ()
dateSetJulian ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Word32
-> m ()
dateSetJulian :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateSetJulian Date
date Word32
julianDate = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_set_julian date' julianDate
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateSetJulianMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.OverloadedMethod DateSetJulianMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Word32 -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateSetJulian
instance O.OverloadedMethodInfo DateSetJulianMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateSetJulian",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateSetJulian"
})
#endif
foreign import ccall "g_date_set_month" g_date_set_month ::
Ptr Date ->
CUInt ->
IO ()
dateSetMonth ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> GLib.Enums.DateMonth
-> m ()
dateSetMonth :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> DateMonth -> m ()
dateSetMonth Date
date DateMonth
month = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
let month' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DateMonth -> Int) -> DateMonth -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DateMonth -> Int
forall a. Enum a => a -> Int
fromEnum) DateMonth
month
g_date_set_month date' month'
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateSetMonthMethodInfo
instance (signature ~ (GLib.Enums.DateMonth -> m ()), MonadIO m) => O.OverloadedMethod DateSetMonthMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> DateMonth -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> DateMonth -> m ()
dateSetMonth
instance O.OverloadedMethodInfo DateSetMonthMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateSetMonth",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateSetMonth"
})
#endif
foreign import ccall "g_date_set_parse" g_date_set_parse ::
Ptr Date ->
CString ->
IO ()
dateSetParse ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> T.Text
-> m ()
dateSetParse :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Text -> m ()
dateSetParse Date
date Text
str = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
str' <- textToCString str
g_date_set_parse date' str'
touchManagedPtr date
freeMem str'
return ()
#if defined(ENABLE_OVERLOADING)
data DateSetParseMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.OverloadedMethod DateSetParseMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Text -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Text -> m ()
dateSetParse
instance O.OverloadedMethodInfo DateSetParseMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateSetParse",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateSetParse"
})
#endif
foreign import ccall "g_date_set_time" g_date_set_time ::
Ptr Date ->
Int32 ->
IO ()
{-# DEPRECATED dateSetTime ["(Since version 2.10)","Use 'GI.GLib.Structs.Date.dateSetTimeT' instead."] #-}
dateSetTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Int32
-> m ()
dateSetTime :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Int32 -> m ()
dateSetTime Date
date Int32
time_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_set_time date' time_
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateSetTimeMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m) => O.OverloadedMethod DateSetTimeMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Int32 -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Int32 -> m ()
dateSetTime
instance O.OverloadedMethodInfo DateSetTimeMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateSetTime",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateSetTime"
})
#endif
foreign import ccall "g_date_set_time_t" g_date_set_time_t ::
Ptr Date ->
FCT.CTime ->
IO ()
dateSetTimeT ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> FCT.CTime
-> m ()
dateSetTimeT :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> CTime -> m ()
dateSetTimeT Date
date CTime
timet = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_set_time_t date' timet
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateSetTimeTMethodInfo
instance (signature ~ (FCT.CTime -> m ()), MonadIO m) => O.OverloadedMethod DateSetTimeTMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> CTime -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> CTime -> m ()
dateSetTimeT
instance O.OverloadedMethodInfo DateSetTimeTMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateSetTimeT",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateSetTimeT"
})
#endif
foreign import ccall "g_date_set_time_val" g_date_set_time_val ::
Ptr Date ->
Ptr GLib.TimeVal.TimeVal ->
IO ()
{-# DEPRECATED dateSetTimeVal ["(Since version 2.62)","t'GI.GLib.Structs.TimeVal.TimeVal' is not year-2038-safe. Use 'GI.GLib.Structs.Date.dateSetTimeT'"," instead."] #-}
dateSetTimeVal ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> GLib.TimeVal.TimeVal
-> m ()
dateSetTimeVal :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> TimeVal -> m ()
dateSetTimeVal Date
date TimeVal
timeval = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
timeval' <- unsafeManagedPtrGetPtr timeval
g_date_set_time_val date' timeval'
touchManagedPtr date
touchManagedPtr timeval
return ()
#if defined(ENABLE_OVERLOADING)
data DateSetTimeValMethodInfo
instance (signature ~ (GLib.TimeVal.TimeVal -> m ()), MonadIO m) => O.OverloadedMethod DateSetTimeValMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> TimeVal -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> TimeVal -> m ()
dateSetTimeVal
instance O.OverloadedMethodInfo DateSetTimeValMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateSetTimeVal",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateSetTimeVal"
})
#endif
foreign import ccall "g_date_set_year" g_date_set_year ::
Ptr Date ->
Word16 ->
IO ()
dateSetYear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Word16
-> m ()
dateSetYear :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word16 -> m ()
dateSetYear Date
date Word16
year = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_set_year date' year
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateSetYearMethodInfo
instance (signature ~ (Word16 -> m ()), MonadIO m) => O.OverloadedMethod DateSetYearMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Word16 -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word16 -> m ()
dateSetYear
instance O.OverloadedMethodInfo DateSetYearMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateSetYear",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateSetYear"
})
#endif
foreign import ccall "g_date_subtract_days" g_date_subtract_days ::
Ptr Date ->
Word32 ->
IO ()
dateSubtractDays ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Word32
-> m ()
dateSubtractDays :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateSubtractDays Date
date Word32
nDays = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_subtract_days date' nDays
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateSubtractDaysMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.OverloadedMethod DateSubtractDaysMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Word32 -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateSubtractDays
instance O.OverloadedMethodInfo DateSubtractDaysMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateSubtractDays",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateSubtractDays"
})
#endif
foreign import ccall "g_date_subtract_months" g_date_subtract_months ::
Ptr Date ->
Word32 ->
IO ()
dateSubtractMonths ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Word32
-> m ()
dateSubtractMonths :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateSubtractMonths Date
date Word32
nMonths = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_subtract_months date' nMonths
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateSubtractMonthsMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.OverloadedMethod DateSubtractMonthsMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Word32 -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateSubtractMonths
instance O.OverloadedMethodInfo DateSubtractMonthsMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateSubtractMonths",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateSubtractMonths"
})
#endif
foreign import ccall "g_date_subtract_years" g_date_subtract_years ::
Ptr Date ->
Word32 ->
IO ()
dateSubtractYears ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Word32
-> m ()
dateSubtractYears :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateSubtractYears Date
date Word32
nYears = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_subtract_years date' nYears
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateSubtractYearsMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.OverloadedMethod DateSubtractYearsMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Word32 -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Word32 -> m ()
dateSubtractYears
instance O.OverloadedMethodInfo DateSubtractYearsMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateSubtractYears",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateSubtractYears"
})
#endif
foreign import ccall "g_date_to_struct_tm" g_date_to_struct_tm ::
Ptr Date ->
Ptr () ->
IO ()
dateToStructTm ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> Ptr ()
-> m ()
dateToStructTm :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Ptr () -> m ()
dateToStructTm Date
date Ptr ()
tm = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
g_date_to_struct_tm date' tm
touchManagedPtr date
return ()
#if defined(ENABLE_OVERLOADING)
data DateToStructTmMethodInfo
instance (signature ~ (Ptr () -> m ()), MonadIO m) => O.OverloadedMethod DateToStructTmMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> Ptr () -> m ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Date -> Ptr () -> m ()
dateToStructTm
instance O.OverloadedMethodInfo DateToStructTmMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateToStructTm",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateToStructTm"
})
#endif
foreign import ccall "g_date_valid" g_date_valid ::
Ptr Date ->
IO CInt
dateValid ::
(B.CallStack.HasCallStack, MonadIO m) =>
Date
-> m Bool
dateValid :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Bool
dateValid Date
date = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
date' <- Date -> IO (Ptr Date)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Date
date
result <- g_date_valid date'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr date
return result'
#if defined(ENABLE_OVERLOADING)
data DateValidMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod DateValidMethodInfo Date signature where
overloadedMethod :: Date -> signature
overloadedMethod = Date -> signature
Date -> m Bool
forall (m :: * -> *). (HasCallStack, MonadIO m) => Date -> m Bool
dateValid
instance O.OverloadedMethodInfo DateValidMethodInfo Date where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.GLib.Structs.Date.dateValid",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-glib-2.0.31/docs/GI-GLib-Structs-Date.html#v:dateValid"
})
#endif
foreign import ccall "g_date_get_days_in_month" g_date_get_days_in_month ::
CUInt ->
Word16 ->
IO Word8
dateGetDaysInMonth ::
(B.CallStack.HasCallStack, MonadIO m) =>
GLib.Enums.DateMonth
-> Word16
-> m Word8
dateGetDaysInMonth :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
DateMonth -> Word16 -> m Word8
dateGetDaysInMonth DateMonth
month Word16
year = IO Word8 -> m Word8
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word8 -> m Word8) -> IO Word8 -> m Word8
forall a b. (a -> b) -> a -> b
$ do
let month' :: CUInt
month' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DateMonth -> Int) -> DateMonth -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DateMonth -> Int
forall a. Enum a => a -> Int
fromEnum) DateMonth
month
result <- CUInt -> Word16 -> IO Word8
g_date_get_days_in_month CUInt
month' Word16
year
return result
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_get_monday_weeks_in_year" g_date_get_monday_weeks_in_year ::
Word16 ->
IO Word8
dateGetMondayWeeksInYear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word16
-> m Word8
dateGetMondayWeeksInYear :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Word16 -> m Word8
dateGetMondayWeeksInYear Word16
year = IO Word8 -> m Word8
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word8 -> m Word8) -> IO Word8 -> m Word8
forall a b. (a -> b) -> a -> b
$ do
result <- Word16 -> IO Word8
g_date_get_monday_weeks_in_year Word16
year
return result
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_get_sunday_weeks_in_year" g_date_get_sunday_weeks_in_year ::
Word16 ->
IO Word8
dateGetSundayWeeksInYear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word16
-> m Word8
dateGetSundayWeeksInYear :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Word16 -> m Word8
dateGetSundayWeeksInYear Word16
year = IO Word8 -> m Word8
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word8 -> m Word8) -> IO Word8 -> m Word8
forall a b. (a -> b) -> a -> b
$ do
result <- Word16 -> IO Word8
g_date_get_sunday_weeks_in_year Word16
year
return result
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_get_weeks_in_year" g_date_get_weeks_in_year ::
Word16 ->
CUInt ->
IO Word8
dateGetWeeksInYear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word16
-> GLib.Enums.DateWeekday
-> m Word8
dateGetWeeksInYear :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Word16 -> DateWeekday -> m Word8
dateGetWeeksInYear Word16
year DateWeekday
firstDayOfWeek = IO Word8 -> m Word8
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word8 -> m Word8) -> IO Word8 -> m Word8
forall a b. (a -> b) -> a -> b
$ do
let firstDayOfWeek' :: CUInt
firstDayOfWeek' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DateWeekday -> Int) -> DateWeekday -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DateWeekday -> Int
forall a. Enum a => a -> Int
fromEnum) DateWeekday
firstDayOfWeek
result <- Word16 -> CUInt -> IO Word8
g_date_get_weeks_in_year Word16
year CUInt
firstDayOfWeek'
return result
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_is_leap_year" g_date_is_leap_year ::
Word16 ->
IO CInt
dateIsLeapYear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word16
-> m Bool
dateIsLeapYear :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word16 -> m Bool
dateIsLeapYear Word16
year = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
result <- Word16 -> IO CInt
g_date_is_leap_year Word16
year
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_strftime" g_date_strftime ::
CString ->
FCT.CSize ->
CString ->
Ptr Date ->
IO FCT.CSize
dateStrftime ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> FCT.CSize
-> T.Text
-> Date
-> m FCT.CSize
dateStrftime :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> CSize -> Text -> Date -> m CSize
dateStrftime Text
s CSize
slen Text
format Date
date = IO CSize -> m CSize
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CSize -> m CSize) -> IO CSize -> m CSize
forall a b. (a -> b) -> a -> b
$ do
s' <- Text -> IO CString
textToCString Text
s
format' <- textToCString format
date' <- unsafeManagedPtrGetPtr date
result <- g_date_strftime s' slen format' date'
touchManagedPtr date
freeMem s'
freeMem format'
return result
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_valid_day" g_date_valid_day ::
Word8 ->
IO CInt
dateValidDay ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word8
-> m Bool
dateValidDay :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word8 -> m Bool
dateValidDay Word8
day = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
result <- Word8 -> IO CInt
g_date_valid_day Word8
day
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_valid_dmy" g_date_valid_dmy ::
Word8 ->
CUInt ->
Word16 ->
IO CInt
dateValidDmy ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word8
-> GLib.Enums.DateMonth
-> Word16
-> m Bool
dateValidDmy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Word8 -> DateMonth -> Word16 -> m Bool
dateValidDmy Word8
day DateMonth
month Word16
year = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
let month' :: CUInt
month' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DateMonth -> Int) -> DateMonth -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DateMonth -> Int
forall a. Enum a => a -> Int
fromEnum) DateMonth
month
result <- Word8 -> CUInt -> Word16 -> IO CInt
g_date_valid_dmy Word8
day CUInt
month' Word16
year
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_valid_julian" g_date_valid_julian ::
Word32 ->
IO CInt
dateValidJulian ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word32
-> m Bool
dateValidJulian :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word32 -> m Bool
dateValidJulian Word32
julianDate = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
result <- Word32 -> IO CInt
g_date_valid_julian Word32
julianDate
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_valid_month" g_date_valid_month ::
CUInt ->
IO CInt
dateValidMonth ::
(B.CallStack.HasCallStack, MonadIO m) =>
GLib.Enums.DateMonth
-> m Bool
dateValidMonth :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
DateMonth -> m Bool
dateValidMonth DateMonth
month = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
let month' :: CUInt
month' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DateMonth -> Int) -> DateMonth -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DateMonth -> Int
forall a. Enum a => a -> Int
fromEnum) DateMonth
month
result <- CUInt -> IO CInt
g_date_valid_month CUInt
month'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_valid_weekday" g_date_valid_weekday ::
CUInt ->
IO CInt
dateValidWeekday ::
(B.CallStack.HasCallStack, MonadIO m) =>
GLib.Enums.DateWeekday
-> m Bool
dateValidWeekday :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
DateWeekday -> m Bool
dateValidWeekday DateWeekday
weekday = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
let weekday' :: CUInt
weekday' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DateWeekday -> Int) -> DateWeekday -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DateWeekday -> Int
forall a. Enum a => a -> Int
fromEnum) DateWeekday
weekday
result <- CUInt -> IO CInt
g_date_valid_weekday CUInt
weekday'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_date_valid_year" g_date_valid_year ::
Word16 ->
IO CInt
dateValidYear ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word16
-> m Bool
dateValidYear :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word16 -> m Bool
dateValidYear Word16
year = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
result <- Word16 -> IO CInt
g_date_valid_year Word16
year
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveDateMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDateMethod "addDays" o = DateAddDaysMethodInfo
ResolveDateMethod "addMonths" o = DateAddMonthsMethodInfo
ResolveDateMethod "addYears" o = DateAddYearsMethodInfo
ResolveDateMethod "clamp" o = DateClampMethodInfo
ResolveDateMethod "clear" o = DateClearMethodInfo
ResolveDateMethod "compare" o = DateCompareMethodInfo
ResolveDateMethod "copy" o = DateCopyMethodInfo
ResolveDateMethod "daysBetween" o = DateDaysBetweenMethodInfo
ResolveDateMethod "free" o = DateFreeMethodInfo
ResolveDateMethod "isFirstOfMonth" o = DateIsFirstOfMonthMethodInfo
ResolveDateMethod "isLastOfMonth" o = DateIsLastOfMonthMethodInfo
ResolveDateMethod "order" o = DateOrderMethodInfo
ResolveDateMethod "subtractDays" o = DateSubtractDaysMethodInfo
ResolveDateMethod "subtractMonths" o = DateSubtractMonthsMethodInfo
ResolveDateMethod "subtractYears" o = DateSubtractYearsMethodInfo
ResolveDateMethod "toStructTm" o = DateToStructTmMethodInfo
ResolveDateMethod "valid" o = DateValidMethodInfo
ResolveDateMethod "getDay" o = DateGetDayMethodInfo
ResolveDateMethod "getDayOfYear" o = DateGetDayOfYearMethodInfo
ResolveDateMethod "getIso8601WeekOfYear" o = DateGetIso8601WeekOfYearMethodInfo
ResolveDateMethod "getJulian" o = DateGetJulianMethodInfo
ResolveDateMethod "getMondayWeekOfYear" o = DateGetMondayWeekOfYearMethodInfo
ResolveDateMethod "getMonth" o = DateGetMonthMethodInfo
ResolveDateMethod "getSundayWeekOfYear" o = DateGetSundayWeekOfYearMethodInfo
ResolveDateMethod "getWeekOfYear" o = DateGetWeekOfYearMethodInfo
ResolveDateMethod "getWeekday" o = DateGetWeekdayMethodInfo
ResolveDateMethod "getYear" o = DateGetYearMethodInfo
ResolveDateMethod "setDay" o = DateSetDayMethodInfo
ResolveDateMethod "setDmy" o = DateSetDmyMethodInfo
ResolveDateMethod "setJulian" o = DateSetJulianMethodInfo
ResolveDateMethod "setMonth" o = DateSetMonthMethodInfo
ResolveDateMethod "setParse" o = DateSetParseMethodInfo
ResolveDateMethod "setTime" o = DateSetTimeMethodInfo
ResolveDateMethod "setTimeT" o = DateSetTimeTMethodInfo
ResolveDateMethod "setTimeVal" o = DateSetTimeValMethodInfo
ResolveDateMethod "setYear" o = DateSetYearMethodInfo
ResolveDateMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDateMethod t Date, O.OverloadedMethod info Date p) => OL.IsLabel t (Date -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel :: Date -> p
fromLabel = forall {k} (i :: k) o s. OverloadedMethod i o s => o -> s
forall i o s. OverloadedMethod i o s => o -> s
O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveDateMethod t Date, O.OverloadedMethod info Date p, R.HasField t Date p) => R.HasField t Date p where
getField :: Date -> p
getField = forall {k} (i :: k) o s. OverloadedMethod i o s => o -> s
forall i o s. OverloadedMethod i o s => o -> s
O.overloadedMethod @info
#endif
instance (info ~ ResolveDateMethod t Date, O.OverloadedMethodInfo info Date) => OL.IsLabel t (O.MethodProxy info Date) where
#if MIN_VERSION_base(4,10,0)
fromLabel :: MethodProxy info Date
fromLabel = MethodProxy info Date
forall info obj. MethodProxy info obj
O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif