Files
xmonad/tests/loc.hs
Spencer Janssen 5c9ad77fd5 Update propaganda.
2007-04-18 01:40:29 +00:00

16 lines
503 B
Haskell

import Control.Monad
import System.Exit
main = do foo <- getContents
let actual_loc = filter isntcomment $
map (dropWhile (==' ')) $ lines foo
loc = length actual_loc
putStrLn $ show loc
-- uncomment the following to check for mistakes in isntcomment
-- putStr $ unlines $ actual_loc
when (loc > 500) $ fail "Too many lines of code!"
isntcomment "" = False
isntcomment ('-':'-':_) = False
isntcomment _ = True