mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Define an existentially-quantified abstraction over term types.
This commit is contained in:
parent
bcb889f85d
commit
010a101de2
@ -2,6 +2,7 @@
|
||||
module Parsing.Parser
|
||||
( Parser(..)
|
||||
, SomeParser(..)
|
||||
, SomeTerm(..)
|
||||
, SomeAnalysisParser(..)
|
||||
, SomeASTParser(..)
|
||||
, someParser
|
||||
@ -151,6 +152,10 @@ markdownParser :: Parser Markdown.Term
|
||||
markdownParser = AssignmentParser MarkdownParser Markdown.assignment
|
||||
|
||||
|
||||
data SomeTerm typeclasses ann where
|
||||
SomeTerm :: ApplyAll typeclasses syntax => Term syntax ann -> SomeTerm typeclasses ann
|
||||
|
||||
|
||||
-- | A parser for producing specialized (tree-sitter) ASTs.
|
||||
data SomeASTParser where
|
||||
SomeASTParser :: (Bounded grammar, Enum grammar, Show grammar)
|
||||
|
Loading…
Reference in New Issue
Block a user