mirror of
https://github.com/github/semantic.git
synced 2024-12-03 13:56:04 +03:00
capitalize T
This commit is contained in:
parent
f9945cbb4c
commit
38aaae5ff4
@ -120,10 +120,10 @@ makeHasFieldInstance ty param elim =
|
|||||||
|
|
||||||
-- | Create TH-generated SymbolMatching instances for sums, products, leaves
|
-- | Create TH-generated SymbolMatching instances for sums, products, leaves
|
||||||
symbolMatchingInstance :: [(String, Named)] -> Name -> Name -> Named -> DatatypeName -> Q [Dec]
|
symbolMatchingInstance :: [(String, Named)] -> Name -> Name -> Named -> DatatypeName -> Q [Dec]
|
||||||
symbolMatchingInstance allSymbols extratypeParametername name named (DatatypeName str) = do
|
symbolMatchingInstance allSymbols extraTypeParameterName name named (DatatypeName str) = do
|
||||||
let tsSymbols = elemIndices (str, named) allSymbols
|
let tsSymbols = elemIndices (str, named) allSymbols
|
||||||
names = intercalate ", " $ fmap (debugPrefix . (!!) allSymbols) tsSymbols
|
names = intercalate ", " $ fmap (debugPrefix . (!!) allSymbols) tsSymbols
|
||||||
[d|instance TS.SymbolMatching ($(conT name) $(varT extratypeParametername)) where
|
[d|instance TS.SymbolMatching ($(conT name) $(varT extraTypeParameterName)) where
|
||||||
matchedSymbols _ = tsSymbols
|
matchedSymbols _ = tsSymbols
|
||||||
showFailure _ node = "expected " <> $(litE (stringL names))
|
showFailure _ node = "expected " <> $(litE (stringL names))
|
||||||
<> " but got " <> if nodeSymbol node == 65535 then "ERROR" else genericIndex debugSymbolNames (nodeSymbol node)
|
<> " but got " <> if nodeSymbol node == 65535 then "ERROR" else genericIndex debugSymbolNames (nodeSymbol node)
|
||||||
|
Loading…
Reference in New Issue
Block a user