go go gadget hlint
This commit is contained in:
parent
9d26192350
commit
9f6b7935dd
21 changed files with 35 additions and 37 deletions
|
@ -19,7 +19,7 @@ import Text.JSON
|
|||
later. -}
|
||||
start :: JSON a => [(String, a)] -> String
|
||||
start l
|
||||
| last s == endchar = take (length s - 1) s
|
||||
| last s == endchar = init s
|
||||
| otherwise = bad s
|
||||
where
|
||||
s = encodeStrict $ toJSObject l
|
||||
|
|
|
@ -63,7 +63,7 @@ consume m (t:ts) = go t
|
|||
where
|
||||
go And = cont $ m `MAnd` next
|
||||
go Or = cont $ m `MOr` next
|
||||
go Not = cont $ m `MAnd` (MNot next)
|
||||
go Not = cont $ m `MAnd` MNot next
|
||||
go Open = let (n, r) = consume next rest in (m `MAnd` n, r)
|
||||
go Close = (m, ts)
|
||||
go (Operation o) = (m `MAnd` MOp o, ts)
|
||||
|
|
|
@ -19,7 +19,7 @@ import Control.Applicative
|
|||
parentDir :: FilePath -> FilePath
|
||||
parentDir dir =
|
||||
if not $ null dirs
|
||||
then slash ++ join s (take (length dirs - 1) dirs)
|
||||
then slash ++ join s (init dirs)
|
||||
else ""
|
||||
where
|
||||
dirs = filter (not . null) $ split s dir
|
||||
|
|
|
@ -24,7 +24,7 @@ newtype TimeSpec = TimeSpec CTime
|
|||
touchBoth :: FilePath -> TimeSpec -> TimeSpec -> Bool -> IO ()
|
||||
|
||||
touch :: FilePath -> TimeSpec -> Bool -> IO ()
|
||||
touch file mtime follow = touchBoth file mtime mtime follow
|
||||
touch file mtime = touchBoth file mtime mtime
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue