mirror of
https://github.com/github/semantic.git
synced 2025-01-09 00:56:32 +03:00
📝 ApplyAll.
This commit is contained in:
parent
73fe3aa62c
commit
3c38aea3a3
@ -52,6 +52,7 @@ data Parser term where
|
|||||||
-- | A parser for 'Markdown' using cmark.
|
-- | A parser for 'Markdown' using cmark.
|
||||||
MarkdownParser :: Parser (Term (TermF [] CMarkGFM.NodeType) (Node Markdown.Grammar))
|
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
|
type family ApplyAll (typeclasses :: [(* -> *) -> Constraint]) (functors :: [* -> *]) :: Constraint where
|
||||||
ApplyAll (typeclass ': typeclasses) functors = (Apply typeclass functors, ApplyAll typeclasses functors)
|
ApplyAll (typeclass ': typeclasses) functors = (Apply typeclass functors, ApplyAll typeclasses functors)
|
||||||
ApplyAll '[] functors = ()
|
ApplyAll '[] functors = ()
|
||||||
|
Loading…
Reference in New Issue
Block a user