mirror of
https://github.com/github/semantic.git
synced 2025-01-03 13:02:37 +03:00
add Java data constructor to language type constructor
This commit is contained in:
parent
a0d880f1fa
commit
4280b9a300
@ -7,6 +7,7 @@ import Data.Aeson
|
|||||||
-- | A programming language.
|
-- | A programming language.
|
||||||
data Language
|
data Language
|
||||||
= Go
|
= Go
|
||||||
|
| Java
|
||||||
| JavaScript
|
| JavaScript
|
||||||
| JSON
|
| JSON
|
||||||
| JSX
|
| JSX
|
||||||
@ -20,6 +21,7 @@ data Language
|
|||||||
-- | Returns a Language based on the file extension (including the ".").
|
-- | Returns a Language based on the file extension (including the ".").
|
||||||
languageForType :: String -> Maybe Language
|
languageForType :: String -> Maybe Language
|
||||||
languageForType mediaType = case mediaType of
|
languageForType mediaType = case mediaType of
|
||||||
|
".java" -> Just Java
|
||||||
".json" -> Just JSON
|
".json" -> Just JSON
|
||||||
".md" -> Just Markdown
|
".md" -> Just Markdown
|
||||||
".rb" -> Just Ruby
|
".rb" -> Just Ruby
|
||||||
|
Loading…
Reference in New Issue
Block a user