mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Define a helper to look up the mode for a given language.
This commit is contained in:
parent
b394bcd816
commit
44f9a11a62
@ -12,6 +12,7 @@ module Data.Language
|
||||
, languageToText
|
||||
, PerLanguageModes(..)
|
||||
, LanguageMode(..)
|
||||
, modeForLanguage
|
||||
) where
|
||||
|
||||
import Data.Aeson
|
||||
@ -150,3 +151,8 @@ data LanguageMode
|
||||
= ALaCarte
|
||||
| Precise
|
||||
deriving (Bounded, Enum, Eq, Ord, Read, Show)
|
||||
|
||||
modeForLanguage :: PerLanguageModes -> Language -> LanguageMode
|
||||
modeForLanguage modes = \case
|
||||
Python -> pythonMode modes
|
||||
_ -> ALaCarte
|
||||
|
Loading…
Reference in New Issue
Block a user