mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
📝 Find'.
This commit is contained in:
parent
83bead5840
commit
607f8263a5
@ -30,6 +30,7 @@ type family Find sub sup :: Side where
|
|||||||
Find t (l :+: r) = Find' 'L t l <> Find' 'R t r
|
Find t (l :+: r) = Find' 'L t l <> Find' 'R t r
|
||||||
Find _ _ = 'None
|
Find _ _ = 'None
|
||||||
|
|
||||||
|
-- | Helper to compute the side an element occurs on.
|
||||||
type family Find' (side :: Side) sub sup :: Side where
|
type family Find' (side :: Side) sub sup :: Side where
|
||||||
Find' s t t = s
|
Find' s t t = s
|
||||||
Find' s t (l :+: r) = Find' s t l <> Find' s t r
|
Find' s t (l :+: r) = Find' s t l <> Find' s t r
|
||||||
|
Loading…
Reference in New Issue
Block a user