From 711ec1957da6c7461e99975839e47d6464c19749 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 8 Oct 2019 15:35:07 -0400 Subject: [PATCH] :memo: Prj. --- semantic-tags/src/AST/Element.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/semantic-tags/src/AST/Element.hs b/semantic-tags/src/AST/Element.hs index 2157d6f9c..50b6d2535 100644 --- a/semantic-tags/src/AST/Element.hs +++ b/semantic-tags/src/AST/Element.hs @@ -16,6 +16,7 @@ instance (Element' side sub sup, side ~ Find sub sup) => Element sub sup where prj = prj' @side +-- | A pattern synonym to conveniently project out matching elements. pattern Prj :: Element sub sup => sub a -> sup a pattern Prj sub <- (prj -> Just sub)