1
1
mirror of https://github.com/github/semantic.git synced 2024-12-30 18:36:27 +03:00

🔥 Finite instance.

This commit is contained in:
Patrick Thomson 2019-06-13 14:21:27 -04:00
parent 838f09e31c
commit c368c43dce

View File

@ -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)