mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
wrap ToTags instances in Parse.Succeed, the Err constructor
This commit is contained in:
parent
65181064d1
commit
505cf319ba
@ -46,16 +46,16 @@ class ToTags (t :: * -> *) where
|
|||||||
tags = gtags
|
tags = gtags
|
||||||
|
|
||||||
instance ToTags Ts.Function where
|
instance ToTags Ts.Function where
|
||||||
tags t@Ts.Function {ann = Loc {byteRange}, name = Just Ts.Identifier {text, ann}} =
|
tags t@Ts.Function {ann = Loc {byteRange}, name = Just (Parse.Succeed Ts.Identifier {text, ann})} =
|
||||||
yieldTag text Function ann byteRange >> gtags t
|
yieldTag text Function ann byteRange >> gtags t
|
||||||
tags t = gtags t
|
tags t = gtags t
|
||||||
|
|
||||||
instance ToTags Ts.FunctionSignature where
|
instance ToTags Ts.FunctionSignature where
|
||||||
tags t@Ts.FunctionSignature {ann = Loc {byteRange}, name = Ts.Identifier {text, ann}} =
|
tags t@Ts.FunctionSignature {ann = Loc {byteRange}, name = Parse.Succeed (Ts.Identifier {text, ann})} =
|
||||||
yieldTag text Function ann byteRange >> gtags t
|
yieldTag text Function ann byteRange >> gtags t
|
||||||
|
|
||||||
instance ToTags Ts.FunctionDeclaration where
|
instance ToTags Ts.FunctionDeclaration where
|
||||||
tags t@Ts.FunctionDeclaration {ann = Loc {byteRange}, name = Ts.Identifier {text, ann}} =
|
tags t@Ts.FunctionDeclaration {ann = Loc {byteRange}, name = Parse.Succeed (Ts.Identifier {text, ann})} =
|
||||||
yieldTag text Function ann byteRange >> gtags t
|
yieldTag text Function ann byteRange >> gtags t
|
||||||
|
|
||||||
instance ToTags Ts.MethodDefinition where
|
instance ToTags Ts.MethodDefinition where
|
||||||
|
Loading…
Reference in New Issue
Block a user