-isHaskellishFilename f = isHaskellishSuffix (suffixOf f)
-isHaskellSrcFilename f = isHaskellSrcSuffix (suffixOf f)
-isCishFilename f = isCishSuffix (suffixOf f)
-isExtCoreFilename f = isExtCoreSuffix (suffixOf f)
-isObjectFilename f = isObjectSuffix (suffixOf f)
-isHaskellUserSrcFilename f = isHaskellUserSrcSuffix (suffixOf f)
-isDynLibFilename f = isDynLibSuffix (suffixOf f)
-isSourceFilename f = isSourceSuffix (suffixOf f)
+isHaskellishFilename, isHaskellSrcFilename, isCishFilename,
+ isExtCoreFilename, isObjectFilename, isHaskellUserSrcFilename,
+ isDynLibFilename, isSourceFilename
+ :: FilePath -> Bool
+-- takeExtension return .foo, so we drop 1 to get rid of the .
+isHaskellishFilename f = isHaskellishSuffix (drop 1 $ takeExtension f)
+isHaskellSrcFilename f = isHaskellSrcSuffix (drop 1 $ takeExtension f)
+isCishFilename f = isCishSuffix (drop 1 $ takeExtension f)
+isExtCoreFilename f = isExtCoreSuffix (drop 1 $ takeExtension f)
+isObjectFilename f = isObjectSuffix (drop 1 $ takeExtension f)
+isHaskellUserSrcFilename f = isHaskellUserSrcSuffix (drop 1 $ takeExtension f)
+isDynLibFilename f = isDynLibSuffix (drop 1 $ takeExtension f)
+isSourceFilename f = isSourceSuffix (drop 1 $ takeExtension f)