mirror of
https://github.com/github/semantic.git
synced 2024-12-30 18:36:27 +03:00
🔥 Finite instance.
This commit is contained in:
parent
838f09e31c
commit
c368c43dce
@ -77,12 +77,6 @@ instance SLanguage 'TypeScript where
|
||||
instance SLanguage 'PHP where
|
||||
reflect _ = PHP
|
||||
|
||||
|
||||
-- This ensures that the protobuf file is generated with ALL_CAPS_NAMES.
|
||||
instance Finite Language where
|
||||
enumerate _ = fmap go [Unknown ..] where
|
||||
go x = (fromString (fmap toUpper (show x)), fromEnum x)
|
||||
|
||||
instance FromJSON Language where
|
||||
parseJSON = withText "Language" $ \l ->
|
||||
pure $ fromMaybe Unknown (parseLanguage l)
|
||||
|
Loading…
Reference in New Issue
Block a user