mirror of
https://github.com/github/semantic.git
synced 2024-12-21 05:41:54 +03:00
Define Language as a GADT.
This commit is contained in:
parent
041f22ddca
commit
e3f95eb9a8
@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DataKinds, GADTs #-}
|
||||
module Language where
|
||||
|
||||
import Data.Record
|
||||
@ -9,12 +9,12 @@ import qualified Syntax as S
|
||||
import Term
|
||||
|
||||
-- | A programming language.
|
||||
data Language =
|
||||
C
|
||||
| Go
|
||||
| Markdown
|
||||
| Ruby
|
||||
| TypeScript -- ^ Also JavaScript.
|
||||
data Language where
|
||||
C :: Language
|
||||
Go :: Language
|
||||
Markdown :: Language
|
||||
Ruby :: Language
|
||||
TypeScript :: Language -- ^ Also JavaScript.
|
||||
deriving (Show, Eq, Read)
|
||||
|
||||
-- | Returns a Language based on the file extension (including the ".").
|
||||
|
Loading…
Reference in New Issue
Block a user