1
1
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:
Rob Rix 2018-05-11 16:48:33 -04:00
parent bcb889f85d
commit 010a101de2

View File

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