Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Attrs (af :: AttrsFor)
- emptyAttrs :: Attrs af
- nullAttrs :: Attrs af -> Bool
- sizeAttrs :: Attrs af -> Int
- memberAttrs :: Key a -> Attrs af -> Bool
- lookupAttrs :: forall a af. KnownAttrType a => Key a -> Attrs af -> Maybe (Attr a)
- foldMapWithKeyAttrs :: forall m af. Monoid m => (forall a. Key a -> Attr a -> m) -> Attrs af -> m
- filterWithKeyAttrs :: forall af. (forall a. Key a -> Attr a -> Bool) -> Attrs af -> Attrs af
- mapWithKeyAttrs :: forall af. (forall a. Key a -> Attr a -> Attr a) -> Attrs af -> Attrs af
- convertWithKeyAttrs :: forall af. (forall a. Key a -> Attr a -> SomeAttr) -> Attrs af -> Attrs af
- droppedAttrsCount :: Attrs af -> Int
- class WithAttrs (a :: Type) where
- type WithAttrsAttrType a :: AttrsFor
- (.:@) :: a -> AttrsBuilder (WithAttrsAttrType a) -> a
- data AttrsBuilder (af :: AttrsFor)
- jsonAttrs :: forall a af. ToJSON a => Text -> a -> AttrsBuilder af
- data AttrsFor
- data AttrsLimits (af :: AttrsFor)
- defaultAttrsLimits :: AttrsLimits af
- attrsLimitsCount :: AttrsLimits af -> Maybe Int
- attrsLimitsValueLength :: AttrsLimits af -> Maybe Int
- data SomeAttr where
- data Attr a = Attr {}
- asTextAttr :: Attr a -> Attr Text
- data AttrVals a
- data AttrType (a :: Type) where
- AttrTypeText :: AttrType Text
- AttrTypeBool :: AttrType Bool
- AttrTypeDouble :: AttrType Double
- AttrTypeInt :: AttrType Int64
- AttrTypeTextArray :: AttrType (AttrVals Text)
- AttrTypeBoolArray :: AttrType (AttrVals Bool)
- AttrTypeDoubleArray :: AttrType (AttrVals Double)
- AttrTypeIntArray :: AttrType (AttrVals Int64)
- class KnownAttrType a where
- attrTypeVal :: Proxy a -> AttrType a
- class KnownAttrType to => ToAttrVal from to | from -> to where
- toAttrVal :: from -> to
Documentation
emptyAttrs :: Attrs af Source #
lookupAttrs :: forall a af. KnownAttrType a => Key a -> Attrs af -> Maybe (Attr a) Source #
foldMapWithKeyAttrs :: forall m af. Monoid m => (forall a. Key a -> Attr a -> m) -> Attrs af -> m Source #
filterWithKeyAttrs :: forall af. (forall a. Key a -> Attr a -> Bool) -> Attrs af -> Attrs af Source #
mapWithKeyAttrs :: forall af. (forall a. Key a -> Attr a -> Attr a) -> Attrs af -> Attrs af Source #
convertWithKeyAttrs :: forall af. (forall a. Key a -> Attr a -> SomeAttr) -> Attrs af -> Attrs af Source #
Equivalent to mapWithKeyAttrs
but allows for changing both the type and
value of each attribute rather than just the value of the attribute.
droppedAttrsCount :: Attrs af -> Int Source #
class WithAttrs (a :: Type) where Source #
type WithAttrsAttrType a :: AttrsFor Source #
(.:@) :: a -> AttrsBuilder (WithAttrsAttrType a) -> a infixr 6 Source #
data AttrsBuilder (af :: AttrsFor) Source #
Instances
Monoid (AttrsBuilder af) Source # | |
Defined in OTel.API.Common.Internal mempty :: AttrsBuilder af # mappend :: AttrsBuilder af -> AttrsBuilder af -> AttrsBuilder af # mconcat :: [AttrsBuilder af] -> AttrsBuilder af # | |
Semigroup (AttrsBuilder af) Source # | |
Defined in OTel.API.Common.Internal (<>) :: AttrsBuilder af -> AttrsBuilder af -> AttrsBuilder af # sconcat :: NonEmpty (AttrsBuilder af) -> AttrsBuilder af # stimes :: Integral b => b -> AttrsBuilder af -> AttrsBuilder af # | |
KV (AttrsBuilder af) Source # | |
Defined in OTel.API.Common.Internal type KVConstraints (AttrsBuilder af) :: Type -> Type -> Constraint Source # (.@) :: KVConstraints (AttrsBuilder af) from to => Key to -> from -> AttrsBuilder af Source # | |
type KVConstraints (AttrsBuilder af) Source # | |
Defined in OTel.API.Common.Internal |
data AttrsLimits (af :: AttrsFor) Source #
Instances
ToJSON (AttrsLimits af) Source # | |
Defined in OTel.API.Common.Internal toJSON :: AttrsLimits af -> Value # toEncoding :: AttrsLimits af -> Encoding # toJSONList :: [AttrsLimits af] -> Value # toEncodingList :: [AttrsLimits af] -> Encoding # omitField :: AttrsLimits af -> Bool # |
defaultAttrsLimits :: AttrsLimits af Source #
attrsLimitsCount :: AttrsLimits af -> Maybe Int Source #
attrsLimitsValueLength :: AttrsLimits af -> Maybe Int Source #
Instances
asTextAttr :: Attr a -> Attr Text Source #
Convert an attribute to a text attribute.
This function is identity if the attribute already is a text attribute.
Otherwise, the attribute value is passed to show
.
Instances
data AttrType (a :: Type) where Source #
class KnownAttrType a where Source #
attrTypeVal :: Proxy a -> AttrType a Source #
Instances
KnownAttrType Int64 Source # | |
Defined in OTel.API.Common.Internal | |
KnownAttrType Text Source # | |
Defined in OTel.API.Common.Internal | |
KnownAttrType Bool Source # | |
Defined in OTel.API.Common.Internal | |
KnownAttrType Double Source # | |
Defined in OTel.API.Common.Internal | |
KnownAttrType (AttrVals Int64) Source # | |
Defined in OTel.API.Common.Internal | |
KnownAttrType (AttrVals Text) Source # | |
Defined in OTel.API.Common.Internal | |
KnownAttrType (AttrVals Bool) Source # | |
Defined in OTel.API.Common.Internal | |
KnownAttrType (AttrVals Double) Source # | |
Defined in OTel.API.Common.Internal |
class KnownAttrType to => ToAttrVal from to | from -> to where Source #