mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-03 05:31:54 -07:00
tweak loc count to match count_lines script
This commit is contained in:
10
StackSet.hs
10
StackSet.hs
@@ -239,12 +239,12 @@ swap a b xs
|
|||||||
|
|
||||||
swap _ _ xs = xs -- do nothing
|
swap _ _ xs = xs -- do nothing
|
||||||
|
|
||||||
{-
|
--
|
||||||
-- cycling:
|
-- cycling:
|
||||||
promote w = w { stacks = M.adjust next (current w) (stacks w) }
|
-- promote w = w { stacks = M.adjust next (current w) (stacks w) }
|
||||||
where next [] = []
|
-- where next [] = []
|
||||||
next xs = last xs : init xs
|
-- next xs = last xs : init xs
|
||||||
-}
|
--
|
||||||
|
|
||||||
-- |
|
-- |
|
||||||
elemAfter :: Eq a => a -> [a] -> Maybe a
|
elemAfter :: Eq a => a -> [a] -> Maybe a
|
||||||
|
@@ -2,7 +2,7 @@ import Control.Monad
|
|||||||
import System.Exit
|
import System.Exit
|
||||||
|
|
||||||
main = do foo <- getContents
|
main = do foo <- getContents
|
||||||
let actual_loc = filter isntcomment $
|
let actual_loc = filter (not.null) $ filter isntcomment $
|
||||||
map (dropWhile (==' ')) $ lines foo
|
map (dropWhile (==' ')) $ lines foo
|
||||||
loc = length actual_loc
|
loc = length actual_loc
|
||||||
putStrLn $ show loc
|
putStrLn $ show loc
|
||||||
@@ -12,4 +12,5 @@ main = do foo <- getContents
|
|||||||
|
|
||||||
isntcomment "" = False
|
isntcomment "" = False
|
||||||
isntcomment ('-':'-':_) = False
|
isntcomment ('-':'-':_) = False
|
||||||
|
isntcomment ('{':'-':_) = False -- pragmas
|
||||||
isntcomment _ = True
|
isntcomment _ = True
|
||||||
|
Reference in New Issue
Block a user