1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Add Listable instance for CyclomaticComplexity

This commit is contained in:
Rick Winfrey 2017-10-16 14:24:49 -07:00
parent b7b134f9ef
commit 2dad14e33e

View File

@ -42,6 +42,7 @@ import Data.Semigroup
import Data.Source
import Data.Span
import qualified Data.Syntax as Syntax
import qualified Data.Syntax.Algebra as Algebra
import qualified Data.Syntax.Comment as Comment
import qualified Data.Syntax.Declaration as Declaration
import qualified Data.Syntax.Statement as Statement
@ -352,6 +353,8 @@ instance Listable Declaration where
\/ cons1 (FunctionDeclaration)
\/ cons1 (flip ErrorDeclaration Nothing)
instance Listable Algebra.CyclomaticComplexity where
tiers = cons1 (Algebra.CyclomaticComplexity)
instance Listable Range where
tiers = cons2 Range