mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Define a Listable instance for Source.
This commit is contained in:
parent
d18dfe453e
commit
329485febd
@ -4,9 +4,11 @@ module Source where
|
||||
|
||||
import Prologue
|
||||
import qualified Data.Text as Text
|
||||
import Data.Text.Listable
|
||||
import Numeric
|
||||
import Range
|
||||
import SourceSpan
|
||||
import Test.LeanCheck
|
||||
|
||||
-- | The source, oid, path, and Maybe SourceKind of a blob in a Git repo.
|
||||
data SourceBlob = SourceBlob { source :: Source, oid :: Text, path :: FilePath, blobKind :: Maybe SourceKind }
|
||||
@ -118,3 +120,6 @@ instance Semigroup Source where
|
||||
instance Monoid Source where
|
||||
mempty = fromList []
|
||||
mappend = (<>)
|
||||
|
||||
instance Listable Source where
|
||||
tiers = (Source . unListableText) `mapT` tiers
|
||||
|
Loading…
Reference in New Issue
Block a user