Skip to content

Commit 9a13c7d

Browse files
committed
Development.IDE.Spans.LocalBindings: 2 fun: put docs to their args
1 parent 72b5f6e commit 9a13c7d

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

ghcide/src/Development/IDE/Spans/LocalBindings.hs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,18 @@ instance Show Bindings where
9494
show _ = "<bindings>"
9595

9696

97-
------------------------------------------------------------------------------
98-
-- | Given a 'Bindings' get every identifier in scope at the given
99-
-- 'RealSrcSpan',
100-
getLocalScope :: Bindings -> RealSrcSpan -> [(Name, Maybe Type)]
97+
getLocalScope :: Bindings -- ^ Given a 'Bindings'
98+
-> RealSrcSpan -- ^ in scope at the given 'RealSrcSpan'
99+
-> [(Name, Maybe Type)] -- ^ return every identifier.
101100
getLocalScope bs rss
102101
= nameEnvElts
103102
$ foldMap snd
104103
$ IM.dominators (realSrcSpanToInterval rss)
105104
$ getLocalBindings bs
106105

107-
------------------------------------------------------------------------------
108-
-- | Given a 'Bindings', get every binding currently active at a given
109-
-- 'RealSrcSpan',
110-
getDefiningBindings :: Bindings -> RealSrcSpan -> [(Name, Maybe Type)]
106+
getDefiningBindings :: Bindings -- ^ Given a 'Bindings'
107+
-> RealSrcSpan -- ^ at a given 'RealSrcSpan'
108+
-> [(Name, Maybe Type)] -- ^ return bindings currently active
111109
getDefiningBindings bs rss
112110
= nameEnvElts
113111
$ foldMap snd
@@ -137,4 +135,3 @@ getFuzzyDefiningBindings bs a b
137135
$ foldMap snd
138136
$ IM.intersections (Interval a b)
139137
$ getBindingSites bs
140-

0 commit comments

Comments
 (0)