Skip to content

Commit bb83c28

Browse files
committed
Development.IDE.Spans.Documentation: getDocumentationsTryGhc: mv Map
1 parent b0b175e commit bb83c28

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ getDocumentationsTryGhc env mod names = do
7272
res <- fun
7373
case res of
7474
Left _ -> return []
75-
Right res -> zipWithM unwrap (fmap snd res) names
75+
Right res -> zipWithM unwrap (fmap snd $ Map.toList res) names
7676
where
77-
fun :: IO (Either [FileDiagnostic] [(Name, Either String (Maybe HsDocString, Map.Map Int HsDocString))])
78-
fun = catchSrcErrors (hsc_dflags env) "docs" $ Map.toList <$> getDocsBatch env mod names
77+
fun :: IO (Either [FileDiagnostic] (Map.Map Name (Either String (Maybe HsDocString, Map.Map Int HsDocString))))
78+
fun = catchSrcErrors (hsc_dflags env) "docs" $ getDocsBatch env mod names
7979

8080
unwrap (Right (Just docs, _)) n = SpanDocString docs <$> getUris n
8181
unwrap _ n = mkSpanDocText n

0 commit comments

Comments
 (0)