UnknownFileType → Binary
This commit is contained in:
parent
ab7c9bef64
commit
bd5f6ca579
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ data FileType
|
||||||
| ReStructuredText
|
| ReStructuredText
|
||||||
| PlainText
|
| PlainText
|
||||||
| Css
|
| Css
|
||||||
| UnknownFileType
|
| Binary
|
||||||
deriving (Eq, Ord, Show, Read)
|
deriving (Eq, Ord, Show, Read)
|
||||||
|
|
||||||
-- | Get the file type for a certain file. The type is determined by extension.
|
-- | Get the file type for a certain file. The type is determined by extension.
|
||||||
|
@ -47,7 +47,7 @@ fileType = fileType' . takeExtension
|
||||||
fileType' ".text" = PlainText
|
fileType' ".text" = PlainText
|
||||||
fileType' ".txt" = PlainText
|
fileType' ".txt" = PlainText
|
||||||
fileType' ".css" = Css
|
fileType' ".css" = Css
|
||||||
fileType' _ = UnknownFileType
|
fileType' _ = Binary -- Treat unknown files as binary
|
||||||
|
|
||||||
-- | Get the file type for the current file
|
-- | Get the file type for the current file
|
||||||
--
|
--
|
||||||
|
|
Loading…
Reference in a new issue