tweak loc count to match count_lines script

This commit is contained in:
Don Stewart
2007-04-18 22:47:25 +00:00
parent f3f83af393
commit cf2c9f7328
2 changed files with 7 additions and 6 deletions

View File

@@ -2,7 +2,7 @@ import Control.Monad
import System.Exit
main = do foo <- getContents
let actual_loc = filter isntcomment $
let actual_loc = filter (not.null) $ filter isntcomment $
map (dropWhile (==' ')) $ lines foo
loc = length actual_loc
putStrLn $ show loc
@@ -12,4 +12,5 @@ main = do foo <- getContents
isntcomment "" = False
isntcomment ('-':'-':_) = False
isntcomment ('{':'-':_) = False -- pragmas
isntcomment _ = True