charon-0.1: Template
Safe HaskellSafe-Inferred
LanguageGHC2021

Charon.Data.Timestamp

Description

Provides the Timestamp data type.

Synopsis

Documentation

newtype Timestamp Source #

Represents a point in time.

Constructors

MkTimestamp 

Instances

Instances details
FromJSON Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

ToJSON Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

Generic Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

Associated Types

type Rep Timestamp :: Type -> Type #

Show Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

Serial Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

Associated Types

type DecodeExtra Timestamp Source #

NFData Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

Methods

rnf :: Timestamp -> () #

Eq Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

Ord Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

Hashable Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

Pretty Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

Methods

pretty :: Timestamp -> Doc ann Source #

prettyList :: [Timestamp] -> Doc ann Source #

Serialise Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

(k ~ An_Iso, a ~ LocalTime, b ~ LocalTime) => LabelOptic "unTimestamp" k Timestamp Timestamp a b Source # 
Instance details

Defined in Charon.Data.Timestamp

type Rep Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

type Rep Timestamp = D1 ('MetaData "Timestamp" "Charon.Data.Timestamp" "charon-0.1-inplace" 'True) (C1 ('MetaCons "MkTimestamp" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTimestamp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalTime)))
type DecodeExtra Timestamp Source # 
Instance details

Defined in Charon.Data.Timestamp

toText :: Timestamp -> Text Source #

Formats the time.

toTextSpace :: Timestamp -> Text Source #

Like toText except adds a space between date and time. Used for pretty-printing.