X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=utils%2Fhasktags%2FHaskTags.hs;fp=utils%2Fhasktags%2FHaskTags.hs;h=355efa82d49acc9f8c849eb7cccb5f2e02739a77;hp=bd066a6d9b76275450847e8dac42fadf7c227782;hb=5d379f055c71d97e193d86963067d4b679bd6781;hpb=96a7900481db325e220667f794eb7499ea64fbc4 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 ()