1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 04:11:48 +03:00

wrap ToTags instances in Parse.Succeed, the Err constructor

This commit is contained in:
Ayman Nadeem 2020-05-07 13:26:31 -04:00
parent 65181064d1
commit 505cf319ba

View File

@ -46,16 +46,16 @@ class ToTags (t :: * -> *) where
tags = gtags
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
tags t = gtags t
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
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
instance ToTags Ts.MethodDefinition where