Simplify hasExt

This commit is contained in:
hasufell 2014-10-07 00:41:03 +02:00
parent dd33a8b252
commit c5621104df

View File

@ -32,9 +32,7 @@ getExt fp
-- |Check if the file has an extension. -- |Check if the file has an extension.
hasExt :: FilePath -> Bool hasExt :: FilePath -> Bool
hasExt fp hasExt = (>1) . length . splitBy (== '.')
| (<= 1) . length . splitBy (== '.') $ fp = False
| otherwise = True
-- |Split an array into subarrays depending on a given condition. -- |Split an array into subarrays depending on a given condition.