From e39ab20eee79f342b7ffe9c91e2608cb1da1994b Mon Sep 17 00:00:00 2001 From: joshvera Date: Thu, 4 Aug 2016 10:13:56 -0400 Subject: [PATCH] Use termNameFromSource in toTermName --- src/DiffSummary.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DiffSummary.hs b/src/DiffSummary.hs index 1ef51776d..3cd46f64d 100644 --- a/src/DiffSummary.hs +++ b/src/DiffSummary.hs @@ -67,10 +67,10 @@ toTermName source term = case unwrap term of S.For exprs _ -> termNameFromChildren term exprs S.While expr _ -> toTermName' expr S.DoWhile _ expr -> toTermName' expr - S.Throw expr -> toText $ Source.slice (characterRange $ extract expr) source + S.Throw expr -> termNameFromSource expr S.Constructor expr -> toTermName' expr - S.Try expr _ _ -> toText $ Source.slice (characterRange $ extract expr) source - S.Array _ -> toText $ Source.slice (characterRange $ extract term) source + S.Try expr _ _ -> termNameFromSource expr + S.Array _ -> termNameFromSource term S.Class identifier _ _ -> toTermName' identifier S.Method identifier _ _ -> toTermName' identifier Comment a -> toCategoryName a