mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Define a type for declarations.
This commit is contained in:
parent
40d8a7ac5c
commit
fdcf96cd4c
@ -5,6 +5,8 @@ module Renderer.TOC
|
|||||||
, JSONSummary(..)
|
, JSONSummary(..)
|
||||||
, Summarizable(..)
|
, Summarizable(..)
|
||||||
, isErrorSummary
|
, isErrorSummary
|
||||||
|
, Declaration(..)
|
||||||
|
, DeclarationType(..)
|
||||||
, Entry(..)
|
, Entry(..)
|
||||||
, tableOfContentsBy
|
, tableOfContentsBy
|
||||||
) where
|
) where
|
||||||
@ -61,6 +63,14 @@ data Summarizable
|
|||||||
}
|
}
|
||||||
deriving (Eq, Show)
|
deriving (Eq, Show)
|
||||||
|
|
||||||
|
-- | A declaration’s identifier and type.
|
||||||
|
data Declaration = Declaration { declarationIdentifier :: Text, declarationType :: DeclarationType }
|
||||||
|
deriving (Eq, Show)
|
||||||
|
|
||||||
|
-- | The type of a declaration.
|
||||||
|
data DeclarationType = Method | Function | Class
|
||||||
|
deriving (Eq, Show)
|
||||||
|
|
||||||
-- | An entry in a table of contents.
|
-- | An entry in a table of contents.
|
||||||
data Entry a
|
data Entry a
|
||||||
= Unchanged a -- ^ An entry for an unchanged portion of a diff (i.e. a diff node not containing any patches).
|
= Unchanged a -- ^ An entry for an unchanged portion of a diff (i.e. a diff node not containing any patches).
|
||||||
|
Loading…
Reference in New Issue
Block a user