| Copyright | (c) 2019-2021 Vaclav Svejcar |
|---|---|
| License | BSD-3-Clause |
| Maintainer | vaclav.svejcar@gmail.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Headroom.Types
Description
Module containing most of the data types used by the application.
Synopsis
- data HeadroomError = forall e.Exception e => HeadroomError e
- fromHeadroomError :: Exception e => SomeException -> Maybe e
- toHeadroomError :: Exception e => e -> SomeException
- newtype CurrentYear = CurrentYear {}
Error Data Types
data HeadroomError Source #
Top-level of the Headroom exception hierarchy.
Constructors
| forall e.Exception e => HeadroomError e |
Instances
| Show HeadroomError Source # | |
Defined in Headroom.Types Methods showsPrec :: Int -> HeadroomError -> ShowS # show :: HeadroomError -> String # showList :: [HeadroomError] -> ShowS # | |
| Exception HeadroomError Source # | |
Defined in Headroom.Types Methods toException :: HeadroomError -> SomeException # fromException :: SomeException -> Maybe HeadroomError # displayException :: HeadroomError -> String # | |
Helper Functions
Arguments
| :: Exception e | |
| => SomeException | exception to unwrap |
| -> Maybe e | unwrapped exception |
Unwraps given exception from HeadroomError.
Arguments
| :: Exception e | |
| => e | exception to wrap |
| -> SomeException | wrapped exception |
Wraps given exception into HeadroomError.
Other Data Types
newtype CurrentYear Source #
Wraps the value of current year.
Constructors
| CurrentYear | |
Fields
| |
Instances
| Eq CurrentYear Source # | |
Defined in Headroom.Types | |
| Show CurrentYear Source # | |
Defined in Headroom.Types Methods showsPrec :: Int -> CurrentYear -> ShowS # show :: CurrentYear -> String # showList :: [CurrentYear] -> ShowS # | |
| Has CurrentYear ConfiguredEnv Source # | |
Defined in Headroom.HeaderFn Methods getter :: ConfiguredEnv -> CurrentYear Source # modifier :: (CurrentYear -> CurrentYear) -> ConfiguredEnv -> ConfiguredEnv Source # hasLens :: Lens' ConfiguredEnv CurrentYear Source # viewL :: MonadReader ConfiguredEnv m => m CurrentYear Source # | |