mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Add Enum/Finite/Named/Message instances for Language
This commit is contained in:
parent
bdd1d58c60
commit
429d42f71e
@ -3,6 +3,7 @@ module Data.Language where
|
||||
|
||||
import Prologue
|
||||
import Data.Aeson
|
||||
import Proto3.Suite
|
||||
|
||||
-- | A programming language.
|
||||
data Language
|
||||
@ -16,7 +17,7 @@ data Language
|
||||
| Ruby
|
||||
| TypeScript
|
||||
| PHP
|
||||
deriving (Eq, Generic, Ord, Read, Show, ToJSON)
|
||||
deriving (Eq, Generic, Ord, Read, Show, ToJSON, Named, Enum, Finite, Message)
|
||||
|
||||
-- | Returns a Language based on the file extension (including the ".").
|
||||
languageForType :: String -> Maybe Language
|
||||
|
Loading…
Reference in New Issue
Block a user