From 607f8263a5aab9b90c54433af74063c62c5ad608 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 8 Oct 2019 15:40:41 -0400 Subject: [PATCH] :memo: Find'. --- 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 22326f556..ea2cfbd0b 100644 --- a/semantic-tags/src/AST/Element.hs +++ b/semantic-tags/src/AST/Element.hs @@ -30,6 +30,7 @@ type family Find sub sup :: Side where Find t (l :+: r) = Find' 'L t l <> Find' 'R t r Find _ _ = 'None +-- | Helper to compute the side an element occurs on. type family Find' (side :: Side) sub sup :: Side where Find' s t t = s Find' s t (l :+: r) = Find' s t l <> Find' s t r