From 3c38aea3a344f2a51903b6b195a8374f6c6a47fc Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 4 Oct 2017 10:57:39 -0400 Subject: [PATCH] :memo: ApplyAll. --- src/Parser.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Parser.hs b/src/Parser.hs index c98f8980d..79ee7bb72 100644 --- a/src/Parser.hs +++ b/src/Parser.hs @@ -52,6 +52,7 @@ data Parser term where -- | A parser for 'Markdown' using cmark. MarkdownParser :: Parser (Term (TermF [] CMarkGFM.NodeType) (Node Markdown.Grammar)) +-- | 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]) (functors :: [* -> *]) :: Constraint where ApplyAll (typeclass ': typeclasses) functors = (Apply typeclass functors, ApplyAll typeclasses functors) ApplyAll '[] functors = ()