From: Ian Lynagh Date: Fri, 15 Feb 2008 15:44:15 +0000 (+0000) Subject: Fix building hasktags X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=5d379f055c71d97e193d86963067d4b679bd6781;ds=sidebyside Fix building hasktags --- 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 ()