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

Language.Haskell.Homplexity.Metric

Description

Class for defining code metrics, and its simplest implementation - number of lines of code.

Synopsis

Documentation

data LOC Source #

Number of lines of code (example metric)

Instances

Instances details
Enum LOC Source # 
Instance details

Defined in Language.Haskell.Homplexity.Metric

Methods

succ :: LOC -> LOC

pred :: LOC -> LOC

toEnum :: Int -> LOC

fromEnum :: LOC -> Int

enumFrom :: LOC -> [LOC]

enumFromThen :: LOC -> LOC -> [LOC]

enumFromTo :: LOC -> LOC -> [LOC]

enumFromThenTo :: LOC -> LOC -> LOC -> [LOC]

Num LOC Source # 
Instance details

Defined in Language.Haskell.Homplexity.Metric

Methods

(+) :: LOC -> LOC -> LOC

(-) :: LOC -> LOC -> LOC

(*) :: LOC -> LOC -> LOC

negate :: LOC -> LOC

abs :: LOC -> LOC

signum :: LOC -> LOC

fromInteger :: Integer -> LOC

Read LOC Source # 
Instance details

Defined in Language.Haskell.Homplexity.Metric

Methods

readsPrec :: Int -> ReadS LOC

readList :: ReadS [LOC]

readPrec :: ReadPrec LOC

readListPrec :: ReadPrec [LOC]

Integral LOC Source # 
Instance details

Defined in Language.Haskell.Homplexity.Metric

Methods

quot :: LOC -> LOC -> LOC

rem :: LOC -> LOC -> LOC

div :: LOC -> LOC -> LOC

mod :: LOC -> LOC -> LOC

quotRem :: LOC -> LOC -> (LOC, LOC)

divMod :: LOC -> LOC -> (LOC, LOC)

toInteger :: LOC -> Integer

Real LOC Source # 
Instance details

Defined in Language.Haskell.Homplexity.Metric

Methods

toRational :: LOC -> Rational

Show LOC Source # 
Instance details

Defined in Language.Haskell.Homplexity.Metric

Methods

showsPrec :: Int -> LOC -> ShowS

show :: LOC -> String

showList :: [LOC] -> ShowS

Eq LOC Source # 
Instance details

Defined in Language.Haskell.Homplexity.Metric

Methods

(==) :: LOC -> LOC -> Bool

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

Ord LOC Source # 
Instance details

Defined in Language.Haskell.Homplexity.Metric

Methods

compare :: LOC -> LOC -> Ordering

(<) :: LOC -> LOC -> Bool

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

(>) :: LOC -> LOC -> Bool

(>=) :: LOC -> LOC -> Bool

max :: LOC -> LOC -> LOC

min :: LOC -> LOC -> LOC

CodeFragment c => Metric LOC c Source # 
Instance details

Defined in Language.Haskell.Homplexity.Metric

Methods

measure :: c -> LOC Source #

locT :: Proxy LOC Source #

Proxy for passing LOC type as parameter.

measureAs :: Metric m c => Proxy m -> c -> m Source #

Convenience function for fixing the Metric type.

measureFor :: Metric m c => Proxy m -> Proxy c -> c -> m Source #

Convenience function for fixing both the Metric and CodeFragment for which the metric is computed.