headroom-0.4.3.0: License Header Manager
Copyright(c) 2019-2022 Vaclav Svejcar
LicenseBSD-3-Clause
Maintainervaclav.svejcar@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Headroom.PostProcess.Types

Description

This module contains data types and type class instances for the post-processing functions.

Synopsis

Documentation

newtype PostProcess env Source #

Definition of post-processor, i.e. function, that is applied to already rendered license header, performs some logic and returns modified text of license header. Given that the reader monad and ReaderT transformer is used, any configuration is provided using the env environment. When combined with the Headroom.Data.Has monad, it provides powerful way how to combine different post-processors and environments.

Structure of post-processor

Text -> Reader env Text
  │              │   │
  └─ rendered text of license header
                 │   │
                 └─ environment holding possible configuration
                     │
                     └─ modified license header text

Constructors

PostProcess (Text -> Reader env Text) 

Instances

Instances details
Semigroup (PostProcess env) Source # 
Instance details

Defined in Headroom.PostProcess.Types

Methods

(<>) :: PostProcess env -> PostProcess env -> PostProcess env #

sconcat :: NonEmpty (PostProcess env) -> PostProcess env #

stimes :: Integral b => b -> PostProcess env -> PostProcess env #

Monoid (PostProcess env) Source # 
Instance details

Defined in Headroom.PostProcess.Types

Methods

mempty :: PostProcess env #

mappend :: PostProcess env -> PostProcess env -> PostProcess env #

mconcat :: [PostProcess env] -> PostProcess env #