Fix building hasktags
authorIan Lynagh <igloo@earth.li>
Fri, 15 Feb 2008 15:44:15 +0000 (15:44 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 15 Feb 2008 15:44:15 +0000 (15:44 +0000)
utils/hasktags/HaskTags.hs

index bd066a6..355efa8 100644 (file)
@@ -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 ()