Copyright | (c) 2019-2020 Vaclav Svejcar |
---|---|
License | BSD-3-Clause |
Maintainer | vaclav.svejcar@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
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
- data TemplateMeta = HaskellTemplateMeta HaddockFieldOffsets
- data HaddockFieldOffsets = HaddockFieldOffsets {
- hfoCopyright :: Maybe Int
- newtype CurrentYear = CurrentYear {}
Error Data Types
data HeadroomError Source #
Top-level of the Headroom exception hierarchy.
forall e.Exception e => HeadroomError e |
Instances
Show HeadroomError Source # | |
Defined in Headroom.Types showsPrec :: Int -> HeadroomError -> ShowS # show :: HeadroomError -> String # showList :: [HeadroomError] -> ShowS # | |
Exception HeadroomError Source # | |
Defined in Headroom.Types |
Helper Functions
:: Exception e | |
=> SomeException | exception to unwrap |
-> Maybe e | unwrapped exception |
Unwraps given exception from HeadroomError
.
:: Exception e | |
=> e | exception to wrap |
-> SomeException | wrapped exception |
Wraps given exception into HeadroomError
.
Other Data Types
data TemplateMeta Source #
Metadata parsed from raw template, specific for selected file type.
Instances
Eq TemplateMeta Source # | |
Defined in Headroom.Types (==) :: TemplateMeta -> TemplateMeta -> Bool # (/=) :: TemplateMeta -> TemplateMeta -> Bool # | |
Show TemplateMeta Source # | |
Defined in Headroom.Types showsPrec :: Int -> TemplateMeta -> ShowS # show :: TemplateMeta -> String # showList :: [TemplateMeta] -> ShowS # |
data HaddockFieldOffsets Source #
Offsets for selected fields extracted from Haddock module header.
HaddockFieldOffsets | |
|
Instances
Eq HaddockFieldOffsets Source # | |
Defined in Headroom.Types (==) :: HaddockFieldOffsets -> HaddockFieldOffsets -> Bool # (/=) :: HaddockFieldOffsets -> HaddockFieldOffsets -> Bool # | |
Show HaddockFieldOffsets Source # | |
Defined in Headroom.Types showsPrec :: Int -> HaddockFieldOffsets -> ShowS # show :: HaddockFieldOffsets -> String # showList :: [HaddockFieldOffsets] -> ShowS # | |
Default HaddockFieldOffsets Source # | |
Defined in Headroom.Types |
newtype CurrentYear Source #
Wraps the value of current year.
CurrentYear | |
|
Instances
Eq CurrentYear Source # | |
Defined in Headroom.Types (==) :: CurrentYear -> CurrentYear -> Bool # (/=) :: CurrentYear -> CurrentYear -> Bool # | |
Show CurrentYear Source # | |
Defined in Headroom.Types showsPrec :: Int -> CurrentYear -> ShowS # show :: CurrentYear -> String # showList :: [CurrentYear] -> ShowS # | |
Has CurrentYear ConfiguredEnv Source # | |
Defined in Headroom.HeaderFn getter :: ConfiguredEnv -> CurrentYear Source # modifier :: (CurrentYear -> CurrentYear) -> ConfiguredEnv -> ConfiguredEnv Source # hasLens :: Lens' ConfiguredEnv CurrentYear Source # viewL :: MonadReader ConfiguredEnv m => m CurrentYear Source # |