mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
Pattern match functions in MethodCalls better in toTermName
This commit is contained in:
parent
a0f415dece
commit
a911515456
@ -30,7 +30,8 @@ toTermName term = case unwrap term of
|
|||||||
(Syntax.FunctionCall{}, _) -> toTermName base <> "()." <> toTermName property
|
(Syntax.FunctionCall{}, _) -> toTermName base <> "()." <> toTermName property
|
||||||
(_, Syntax.FunctionCall{}) -> toTermName base <> "." <> toTermName property <> "()"
|
(_, Syntax.FunctionCall{}) -> toTermName base <> "." <> toTermName property <> "()"
|
||||||
(_, _) -> toTermName base <> "." <> toTermName property
|
(_, _) -> toTermName base <> "." <> toTermName property
|
||||||
Syntax.MethodCall targetId methodId _ -> toTermName targetId <> "." <> toTermName methodId <> "()"
|
Syntax.MethodCall targetId methodId _ -> let sep = case unwrap targetId of Syntax.FunctionCall{} -> "()."; _ -> "." in
|
||||||
|
toTermName targetId <> sep <> toTermName methodId <> "()"
|
||||||
|
|
||||||
class HasCategory a where
|
class HasCategory a where
|
||||||
toCategoryName :: a -> Text
|
toCategoryName :: a -> Text
|
||||||
|
Loading…
Reference in New Issue
Block a user