Safe Haskell | None |
---|---|
Language | Haskell2010 |
Class for defining code metrics, and its simplest implementation - number of lines of code.
Documentation
class (CodeFragment c, Show m) => Metric m c where Source #
Metric can be computed on a set of CodeFragment
fragments
and then shown.
Instances
CodeFragment c => Metric LOC c Source # | |
Defined in Language.Haskell.Homplexity.Metric | |
Metric NumFunArgs TypeSignature Source # | |
Defined in Language.Haskell.Homplexity.TypeComplexity measure :: TypeSignature -> NumFunArgs Source # | |
Metric ConDepth TypeSignature Source # | |
Defined in Language.Haskell.Homplexity.TypeComplexity measure :: TypeSignature -> ConDepth Source # | |
Metric AssocTypeCount TypeClass Source # | |
Defined in Language.Haskell.Homplexity.TypeClassComplexity measure :: TypeClass -> AssocTypeCount Source # | |
Metric NonTypeDeclCount TypeClass Source # | |
Defined in Language.Haskell.Homplexity.TypeClassComplexity measure :: TypeClass -> NonTypeDeclCount Source # | |
Metric RecordFieldsCount DataDef Source # | |
Defined in Language.Haskell.Homplexity.RecordFieldsCount measure :: DataDef -> RecordFieldsCount Source # | |
Metric Depth Function Source # | |
Metric Cyclomatic Function Source # | |
Defined in Language.Haskell.Homplexity.Cyclomatic measure :: Function -> Cyclomatic Source # |
Number of lines of code (example metric)
Instances
Enum LOC Source # | |
Eq LOC Source # | |
Integral LOC Source # | |
Num LOC Source # | |
Ord LOC Source # | |
Read LOC Source # | |
Real LOC Source # | |
Defined in Language.Haskell.Homplexity.Metric toRational :: LOC -> Rational # | |
Show LOC Source # | |
CodeFragment c => Metric LOC c Source # | |
Defined in Language.Haskell.Homplexity.Metric |