summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-04-19 00:47:25 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-04-19 00:47:25 +0200
commitdebb8785f27d176f5e6ea8b471c606b07feaae8b (patch)
tree902f59b074ce310c8984f4ec5fdc1cf376dcfcce
parent52bbce6a3e6de7cde3f5246d64867f8ba446c647 (diff)
downloadmetatile-debb8785f27d176f5e6ea8b471c606b07feaae8b.tar
metatile-debb8785f27d176f5e6ea8b471c606b07feaae8b.zip
tweak loc count to match count_lines script
darcs-hash:20070418224725-9c5c1-e885b1392c8f6aaa1ccd5c5cbcdc9c41b29b6b6a
-rw-r--r--StackSet.hs10
-rw-r--r--tests/loc.hs3
2 files changed, 7 insertions, 6 deletions
diff --git a/StackSet.hs b/StackSet.hs
index a7bc376..f0168d1 100644
--- a/StackSet.hs
+++ b/StackSet.hs
@@ -239,12 +239,12 @@ swap a b xs
swap _ _ xs = xs -- do nothing
-{-
+--
-- cycling:
-promote w = w { stacks = M.adjust next (current w) (stacks w) }
- where next [] = []
- next xs = last xs : init xs
--}
+-- promote w = w { stacks = M.adjust next (current w) (stacks w) }
+-- where next [] = []
+-- next xs = last xs : init xs
+--
-- |
elemAfter :: Eq a => a -> [a] -> Maybe a
diff --git a/tests/loc.hs b/tests/loc.hs
index 7911b9a..289c629 100644
--- a/tests/loc.hs
+++ b/tests/loc.hs
@@ -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