1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 04:51:57 +03:00

add Java data constructor to language type constructor

This commit is contained in:
Ayman Nadeem 2018-03-16 17:00:11 -07:00
parent a0d880f1fa
commit 4280b9a300

View File

@ -7,6 +7,7 @@ import Data.Aeson
-- | A programming language.
data Language
= Go
| Java
| JavaScript
| JSON
| JSX
@ -20,6 +21,7 @@ data Language
-- | Returns a Language based on the file extension (including the ".").
languageForType :: String -> Maybe Language
languageForType mediaType = case mediaType of
".java" -> Just Java
".json" -> Just JSON
".md" -> Just Markdown
".rb" -> Just Ruby