diff --git a/src/Control/Carrier/Parse/Measured.hs b/src/Control/Carrier/Parse/Measured.hs index fddbd3d30..2116ea22a 100644 --- a/src/Control/Carrier/Parse/Measured.hs +++ b/src/Control/Carrier/Parse/Measured.hs @@ -75,7 +75,6 @@ runParser blob@Blob{..} parser = case parser of time "parse.cmark_parse" languageTag $ let term = cmarkParser blobSource in length term `seq` pure term - SomeParser parser -> SomeTerm <$> runParser blob parser where languageTag = [("language" :: String, show (blobLanguage blob))] data ParserCancelled = ParserTimedOut | AssignmentTimedOut diff --git a/src/Control/Carrier/Parse/Simple.hs b/src/Control/Carrier/Parse/Simple.hs index d7bf004dc..9339f041b 100644 --- a/src/Control/Carrier/Parse/Simple.hs +++ b/src/Control/Carrier/Parse/Simple.hs @@ -65,7 +65,6 @@ runParser timeout blob@Blob{..} parser = case parser of MarkdownParser -> let term = cmarkParser blobSource in length term `seq` pure term - SomeParser parser -> SomeTerm <$> runParser timeout blob parser data ParseFailure = ParseFailure String deriving (Show, Typeable) diff --git a/src/Parsing/Parser.hs b/src/Parsing/Parser.hs index c287bdb78..ae65e4dbb 100644 --- a/src/Parsing/Parser.hs +++ b/src/Parsing/Parser.hs @@ -112,8 +112,7 @@ data Parser term where -> Parser (Term (Sum syntaxes) Loc) -- | A parser for 'Markdown' using cmark. MarkdownParser :: Parser (Term (TermF [] CMarkGFM.NodeType) (Node Markdown.Grammar)) - -- | An abstraction over parsers when we don’t know the details of the term type. - SomeParser :: ApplyAll typeclasses syntax => Parser (Term syntax ann) -> Parser (SomeTerm typeclasses ann) + -- | Apply all of a list of typeclasses to all of a list of functors using 'Apply'. Used by 'someParser' to constrain all of the language-specific syntax types to the typeclasses in question. type family ApplyAll (typeclasses :: [(* -> *) -> Constraint]) (syntax :: * -> *) :: Constraint where