homplexity-0.4.4.3: 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

class (CodeFragment c, Show m) => Metric m c where Source

Metric can be computed on a set of CodeFragment fragments and then shown.

Methods

measure :: c -> m Source

data LOC Source

Number of lines of code (example metric)

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.