| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Control.Monad.Component.Internal.Types
Synopsis
- data ComponentError
- data ComponentBuildError
- = DuplicatedComponentKeyDetected !Description
- | ComponentAllocationFailed !Description !SomeException
- | ComponentErrorThrown !SomeException
- | ComponentIOLiftFailed !SomeException
- newtype ComponentM a = ComponentM (IO (Either ([ComponentBuildError], BuildTable) (a, BuildTable)))
- data Build = Build {
- componentDesc :: !Description
- componentTeardown :: !Teardown
- buildElapsedTime :: !NominalDiffTime
- buildFailure :: !(Maybe SomeException)
- buildDependencies :: !(Set Description)
- newtype BuildResult = BuildResult {
- toBuildList :: [Build]
- data TeardownResult
- data ComponentEvent
- buildTableToOrderedList :: BuildTable -> [Build]
- buildTableToTeardown :: Text -> BuildTable -> IO Teardown
Documentation
data ComponentError #
Exception thrown by the runComponentM family of functions
Constructors
| ComponentRuntimeFailed | Failure raised when the Application Callback given to a |
Fields
| |
| ComponentBuildFailed | Failure raised when execution of |
Fields
| |
Instances
data ComponentBuildError #
Exception raised on the execution of IO sub-routines used when
constructing ComponentM values (e.g. buildComponent)
Constructors
| DuplicatedComponentKeyDetected !Description | Failure thrown when using the same component key on a Component composition |
| ComponentAllocationFailed !Description !SomeException | Failure thrown when the allocation sub-routine of a Component fails with an exception |
| ComponentErrorThrown !SomeException | Failure thrown when calling the |
| ComponentIOLiftFailed !SomeException | Failure thrown when calling |
Instances
| Show ComponentBuildError # | |
Defined in Control.Monad.Component.Internal.Types Methods showsPrec :: Int -> ComponentBuildError -> ShowS # show :: ComponentBuildError -> String # showList :: [ComponentBuildError] -> ShowS # | |
| Generic ComponentBuildError # | |
Defined in Control.Monad.Component.Internal.Types Associated Types type Rep ComponentBuildError :: * -> * # Methods from :: ComponentBuildError -> Rep ComponentBuildError x # to :: Rep ComponentBuildError x -> ComponentBuildError # | |
| Exception ComponentBuildError # | |
Defined in Control.Monad.Component.Internal.Types Methods toException :: ComponentBuildError -> SomeException # fromException :: SomeException -> Maybe ComponentBuildError # | |
| Pretty ComponentBuildError # | |
Defined in Control.Monad.Component.Internal.Types | |
| type Rep ComponentBuildError # | |
Defined in Control.Monad.Component.Internal.Types | |
newtype ComponentM a #
Represents the construction of a Component in your application, components
may be composed using a Monad or Applicative interface.
Constructors
| ComponentM (IO (Either ([ComponentBuildError], BuildTable) (a, BuildTable))) |
Instances
Contains metadata about the build of a resource from a ComponentM value
Constructors
| Build | |
Fields
| |
Instances
| Generic Build # | |
| Pretty Build # | |
Defined in Control.Monad.Component.Internal.Types | |
| Display Build # | |
Defined in Control.Monad.Component.Internal.Types Methods display :: Build -> Utf8Builder # | |
| type Rep Build # | |
Defined in Control.Monad.Component.Internal.Types | |
newtype BuildResult #
Wraps a collection of Build records
Constructors
| BuildResult | |
Fields
| |
Instances
| Pretty BuildResult # | |
Defined in Control.Monad.Component.Internal.Types | |
| Display BuildResult # | |
Defined in Control.Monad.Component.Internal.Types Methods display :: BuildResult -> Utf8Builder # | |
data TeardownResult #
Result from a Teardown sub-routine
Instances
data ComponentEvent #
An event record used to trace the execution of an application initialization and teardown
Constructors
| ComponentBuilt !BuildResult | |
| ComponentReleased !TeardownResult | |
| ComponentErrorDetected !ComponentError |
Instances
| Pretty ComponentEvent # | |
Defined in Control.Monad.Component.Internal.Types | |
| Display ComponentEvent # | |
Defined in Control.Monad.Component.Internal.Types Methods display :: ComponentEvent -> Utf8Builder # | |
buildTableToOrderedList :: BuildTable -> [Build] #
buildTableToTeardown :: Text -> BuildTable -> IO Teardown #