homplexity-0.4.8.1: Haskell code quality tool
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Haskell.Homplexity.Message

Description

Classifying messages by severity and filtering them.

Synopsis

Documentation

data Log Source #

Keeps a set of messages

Instances

Instances details
Monoid Log Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

mempty :: Log

mappend :: Log -> Log -> Log

mconcat :: [Log] -> Log

Semigroup Log Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

(<>) :: Log -> Log -> Log

sconcat :: NonEmpty Log -> Log

stimes :: Integral b => b -> Log -> Log

Show Log Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

showsPrec :: Int -> Log -> ShowS

show :: Log -> String

showList :: [Log] -> ShowS

NFData Log Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

rnf :: Log -> ()

data Message Source #

Message from analysis

Instances

Instances details
Show Message Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

showsPrec :: Int -> Message -> ShowS

show :: Message -> String

showList :: [Message] -> ShowS

NFData Message Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

rnf :: Message -> ()

Eq Message Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

(==) :: Message -> Message -> Bool

(/=) :: Message -> Message -> Bool

data Severity Source #

Message severity

Constructors

Debug 
Info 
Warning 
Critical 

Instances

Instances details
Bounded Severity Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Enum Severity Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Generic Severity Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Associated Types

type Rep Severity :: Type -> Type

Methods

from :: Severity -> Rep Severity x

to :: Rep Severity x -> Severity

Read Severity Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

readsPrec :: Int -> ReadS Severity

readList :: ReadS [Severity]

readPrec :: ReadPrec Severity

readListPrec :: ReadPrec [Severity]

Show Severity Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

showsPrec :: Int -> Severity -> ShowS

show :: Severity -> String

showList :: [Severity] -> ShowS

NFData Severity Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

rnf :: Severity -> ()

Eq Severity Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

(==) :: Severity -> Severity -> Bool

(/=) :: Severity -> Severity -> Bool

Ord Severity Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

compare :: Severity -> Severity -> Ordering

(<) :: Severity -> Severity -> Bool

(<=) :: Severity -> Severity -> Bool

(>) :: Severity -> Severity -> Bool

(>=) :: Severity -> Severity -> Bool

max :: Severity -> Severity -> Severity

min :: Severity -> Severity -> Severity

FlagType Severity Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

defineFlag :: String -> Severity -> String -> Q [Dec]

Lift Severity Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

Methods

lift :: Quote m => Severity -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => Severity -> Code m Severity

type Rep Severity Source # 
Instance details

Defined in Language.Haskell.Homplexity.Message

type Rep Severity = D1 ('MetaData "Severity" "Language.Haskell.Homplexity.Message" "homplexity-0.4.8.1-inplace" 'False) ((C1 ('MetaCons "Debug" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Info" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Warning" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Critical" 'PrefixI 'False) (U1 :: Type -> Type)))

severityOptions :: String Source #

String showing all possible values for Severity.

critical :: SrcLoc -> String -> Log Source #

TODO: automatic inference of the srcLine | Log a certain error

warn :: SrcLoc -> String -> Log Source #

Log a warning

info :: SrcLoc -> String -> Log Source #

Log informational message

debug :: SrcLoc -> String -> Log Source #

Log debugging message

message :: Severity -> SrcLoc -> String -> Log Source #

Helper for logging a message with given severity.

extract :: Severity -> Log -> [Message] Source #

Extract an ordered sequence of messages from the Log.