fileparse :: [String] -- ^ list of suffixes
          -> FilePath
          -> (FilePath, FilePath, Maybe String)
          -- ^ (basename,directory,matched suffix)
fileparse sufs fp = let (path, base) = stripDir fp
                        (base', suf) = stripSuffix sufs base
                    in (base', path, suf)
fileparse :: [String] -- ^ list of suffixes
          -> FilePath
          -> (FilePath, FilePath, Maybe String)
fileparse sufs fp = let (path, base) = stripDir fp
                        (base', suf) = stripSuffix sufs base
                    in (base', path, suf)
fileparse sufs fp = let (path, base) = stripDir fp
                        (base', suf) = stripSuffix sufs base
                    in (base', path, suf)