mirror of
https://github.com/github/semantic.git
synced 2024-11-29 11:02:26 +03:00
better docs
This commit is contained in:
parent
7ea52dbfe3
commit
8e4f9ea119
@ -149,9 +149,10 @@ f >>: a = need f >>> a
|
||||
narrow :: (f :< fs) => Matcher (Term (Sum fs) ann) (f (Term (Sum fs) ann))
|
||||
narrow = purely projectTerm >>= foldMapA pure
|
||||
|
||||
-- | Like 'narrow', but it returns the result of the projection
|
||||
-- in a 'TermF'. Useful for returning a matched node after ensuring
|
||||
-- its contents are valid, e.g @narrowF <* a >:: b >>> ensure f@
|
||||
-- | Like 'narrow', but it returns the result of the projection in a
|
||||
-- 'TermF'. Useful for returning a matched node after ensuring its
|
||||
-- contents are projectable and valid, e.g @narrowF <* a >:: b >>>
|
||||
-- ensure f@, without losing valuable annotation info.
|
||||
narrowF :: (f :< fs, term ~ Term (Sum fs) ann)
|
||||
=> Matcher term (TermF f ann term)
|
||||
narrowF = do
|
||||
|
Loading…
Reference in New Issue
Block a user