From 5d379f055c71d97e193d86963067d4b679bd6781 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Fri, 15 Feb 2008 15:44:15 +0000 Subject: [PATCH] Fix building hasktags --- utils/hasktags/HaskTags.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/utils/hasktags/HaskTags.hs b/utils/hasktags/HaskTags.hs index bd066a6..355efa8 100644 --- a/utils/hasktags/HaskTags.hs +++ b/utils/hasktags/HaskTags.hs @@ -158,11 +158,10 @@ findthings filename = do let aslines = lines text let wordlines = map mywords aslines let noslcoms = map stripslcomments wordlines - -- there are some tokens with "" (don't know why yet) this filter fixes it - let tokens = filter (\(Token s _ ) -> (not . null) s ) $ - concat $ zipWith3 (withline filename) noslcoms - aslines [0 ..] - let nocoms = stripblockcomments tokens + let tokens = concat $ zipWith3 (withline filename) noslcoms aslines [0 ..] + -- there are some tokens with "" (don't know why yet) this filter fixes it + let tokens' = filter (\(Token s _ ) -> (not . null) s ) tokens + let nocoms = stripblockcomments tokens' -- using nub because getcons and findstuff are parsing parts of the file twice return $ FileData filename $ nub $ findstuff nocoms where evaluate [] = return () -- 1.7.10.4