From 17481f566e9bfc264bd31b4c6198d4e7efb953da Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 2 Oct 2019 14:52:45 -0400 Subject: [PATCH] :memo: SomeParser. --- src/Parsing/Parser.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Parsing/Parser.hs b/src/Parsing/Parser.hs index 4c8838b20..334d3b28b 100644 --- a/src/Parsing/Parser.hs +++ b/src/Parsing/Parser.hs @@ -201,6 +201,9 @@ someASTParser Markdown = Nothing someASTParser Unknown = Nothing +-- | A parser producing terms of existentially-quantified type under some constraint @c@. +-- +-- This can be used to perform actions on terms supporting some feature abstracted using a typeclass, without knowing (or caring) what the specific term types are. data SomeParser c a where SomeParser :: c t => Parser (t a) -> SomeParser c a