homplexity-0.4.7.0: Haskell code quality tool

Safe HaskellNone
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
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] #

Eq LOC Source # 
Instance details

Defined in Language.Haskell.Homplexity.Metric

Methods

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

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

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 #

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 #

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 #

Read LOC Source # 
Instance details

Defined in Language.Haskell.Homplexity.Metric

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 #

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.