From 010a101de2b7473ebc211126d5709c36c73522f4 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 11 May 2018 16:48:33 -0400 Subject: [PATCH] Define an existentially-quantified abstraction over term types. --- src/Parsing/Parser.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Parsing/Parser.hs b/src/Parsing/Parser.hs index 3c6423075..63a8356d9 100644 --- a/src/Parsing/Parser.hs +++ b/src/Parsing/Parser.hs @@ -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)