1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 11:04:00 +03:00

📝 Find'.

This commit is contained in:
Rob Rix 2019-10-08 15:40:41 -04:00
parent 83bead5840
commit 607f8263a5
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -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