1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

📝 ApplyAll.

This commit is contained in:
Rob Rix 2017-10-04 10:57:39 -04:00
parent 73fe3aa62c
commit 3c38aea3a3

View File

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