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

Headroom.HeaderFn.Types

Description

This module contains data types and type class instances for the license header functions.

Synopsis

Documentation

newtype HeaderFn env Source #

Definition of license header function, 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 license header function and environments.

Structure of License Header Function Type

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

Constructors

HeaderFn (Text -> Reader env Text) 

Instances

Instances details
Semigroup (HeaderFn env) Source # 
Instance details

Defined in Headroom.HeaderFn.Types

Methods

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

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

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

Monoid (HeaderFn env) Source # 
Instance details

Defined in Headroom.HeaderFn.Types

Methods

mempty :: HeaderFn env #

mappend :: HeaderFn env -> HeaderFn env -> HeaderFn env #

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