Copyright | (c) Ian Duncan 2021 |
---|---|
License | BSD-3 |
Maintainer | Ian Duncan |
Stability | experimental |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- constructorName :: (HasConstructor (Rep a), Generic a) => a -> String
- class HasConstructor (f :: Type -> Type)
- getThreadId :: ThreadId -> Int
- bracketError :: MonadUnliftIO m => m a -> (Maybe SomeException -> a -> m b) -> (a -> m c) -> m c
- data AppendOnlyBoundedCollection a
- emptyAppendOnlyBoundedCollection :: Int -> AppendOnlyBoundedCollection a
- appendToBoundedCollection :: AppendOnlyBoundedCollection a -> a -> AppendOnlyBoundedCollection a
- appendOnlyBoundedCollectionSize :: AppendOnlyBoundedCollection a -> Int
- appendOnlyBoundedCollectionValues :: AppendOnlyBoundedCollection a -> Vector a
- appendOnlyBoundedCollectionDroppedElementCount :: AppendOnlyBoundedCollection a -> Int
- data FrozenBoundedCollection a
- frozenBoundedCollection :: Foldable f => Int -> f a -> FrozenBoundedCollection a
- frozenBoundedCollectionValues :: FrozenBoundedCollection a -> Vector a
- frozenBoundedCollectionDroppedElementCount :: FrozenBoundedCollection a -> Int
Documentation
constructorName :: (HasConstructor (Rep a), Generic a) => a -> String Source #
Useful for annotating which constructor in an ADT was chosen
Since: 0.1.0.0
class HasConstructor (f :: Type -> Type) Source #
Detect a constructor from any datatype which derives Generic
genericConstrName
Instances
(HasConstructor x, HasConstructor y) => HasConstructor (x :+: y) Source # | |
Defined in OpenTelemetry.Util genericConstrName :: (x :+: y) x0 -> String | |
Constructor c => HasConstructor (C1 c f) Source # | |
Defined in OpenTelemetry.Util genericConstrName :: C1 c f x -> String | |
HasConstructor f => HasConstructor (D1 c f) Source # | |
Defined in OpenTelemetry.Util genericConstrName :: D1 c f x -> String |
getThreadId :: ThreadId -> Int Source #
Get an int representation of a thread id
bracketError :: MonadUnliftIO m => m a -> (Maybe SomeException -> a -> m b) -> (a -> m c) -> m c Source #
Like bracket
, but provides the after
function with information about
uncaught exceptions.
Since: 0.1.0.0
Data structures
data AppendOnlyBoundedCollection a Source #
Instances
Show a => Show (AppendOnlyBoundedCollection a) Source # | |
Defined in OpenTelemetry.Util showsPrec :: Int -> AppendOnlyBoundedCollection a -> ShowS # show :: AppendOnlyBoundedCollection a -> String # showList :: [AppendOnlyBoundedCollection a] -> ShowS # |
emptyAppendOnlyBoundedCollection Source #
:: Int | Maximum size |
-> AppendOnlyBoundedCollection a |
Initialize a bounded collection that admits a maximum size
appendToBoundedCollection :: AppendOnlyBoundedCollection a -> a -> AppendOnlyBoundedCollection a Source #
data FrozenBoundedCollection a Source #
Instances
Show a => Show (FrozenBoundedCollection a) Source # | |
Defined in OpenTelemetry.Util showsPrec :: Int -> FrozenBoundedCollection a -> ShowS # show :: FrozenBoundedCollection a -> String # showList :: [FrozenBoundedCollection a] -> ShowS # |
frozenBoundedCollection :: Foldable f => Int -> f a -> FrozenBoundedCollection a Source #