From 30c9fd8f5f9a29c09868ebc8202d1a644948d145 Mon Sep 17 00:00:00 2001 From: joshvera Date: Thu, 13 Oct 2016 11:56:49 -0400 Subject: [PATCH] Remove trailing 'function' text from AnonymousFunction toTermName output --- src/DiffSummary.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DiffSummary.hs b/src/DiffSummary.hs index 9d76c0e89..b71e808a4 100644 --- a/src/DiffSummary.hs +++ b/src/DiffSummary.hs @@ -158,7 +158,7 @@ toLeafInfos leaf = pure . flip JSONSummary (sourceSpan leaf) $ case leaf of -- Returns a text representing a specific term given a source and a term. toTermName :: forall leaf fields. (HasCategory leaf, HasField fields Category, HasField fields Range) => Source Char -> SyntaxTerm leaf fields -> Text toTermName source term = case unwrap term of - S.AnonymousFunction params _ -> "anonymous" <> paramsToArgNames params <> " function" + S.AnonymousFunction params _ -> "anonymous" <> paramsToArgNames params S.Fixed children -> fromMaybe "branch" $ (toCategoryName . category) . extract <$> head children S.Indexed children -> fromMaybe "branch" $ (toCategoryName . category) . extract <$> head children Leaf leaf -> toCategoryName leaf