1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

Carry a list of kinds around.

This commit is contained in:
Rob Rix 2019-09-19 17:26:33 -04:00
parent 9255156341
commit 933f6846c3
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -42,15 +42,13 @@ instance ToJSON Kind where
toEncoding = toEncoding . show
type ContextToken = (Text, Maybe Range)
runTagging :: Source -> Py.Module Location -> [Tag]
runTagging source
= ($ [])
. appEndo
. run
. execWriter
. runReader @[ContextToken] []
. runReader @[Kind] []
. runReader source
. tag where
@ -58,7 +56,7 @@ class ToTag t where
tag
:: ( Carrier sig m
, Member (Reader Source) sig
, Member (Reader [ContextToken]) sig
, Member (Reader [Kind]) sig
, Member (Writer (Endo [Tag])) sig
)
=> t
@ -72,7 +70,7 @@ class ToTagBy (strategy :: Strategy) t where
tag'
:: ( Carrier sig m
, Member (Reader Source) sig
, Member (Reader [ContextToken]) sig
, Member (Reader [Kind]) sig
, Member (Writer (Endo [Tag])) sig
)
=> t
@ -134,7 +132,7 @@ class GToTag t where
gtag
:: ( Carrier sig m
, Member (Reader Source) sig
, Member (Reader [ContextToken]) sig
, Member (Reader [Kind]) sig
, Member (Writer (Endo [Tag])) sig
)
=> t a