File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
ghcide/src/Development/IDE Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -994,19 +994,19 @@ getDocsBatch
994
994
:: HscEnv
995
995
-> Module -- ^ a moudle where the names are in scope
996
996
-> [Name ]
997
- -> IO (Map. Map Name (Either String (Maybe HsDocString , Map. Map Int HsDocString )))
997
+ -> IO (Map. Map Name (Either T. Text (Maybe HsDocString , Map. Map Int HsDocString )))
998
998
getDocsBatch hsc_env _mod _names = do
999
999
((_warns,errs), res) <- initTc hsc_env HsSrcFile False _mod fakeSpan $ Map. fromList <$> traverse findNameInfo _names
1000
1000
case res of
1001
1001
Just x -> return $ fun x
1002
1002
Nothing -> throwErrors errs
1003
1003
where
1004
- fun :: Map. Map Name (Either GetDocsFailure c ) -> Map. Map Name (Either String c )
1004
+ fun :: Map. Map Name (Either GetDocsFailure c ) -> Map. Map Name (Either T. Text c )
1005
1005
fun =
1006
1006
Map. map fun1
1007
1007
where
1008
- fun1 :: Either GetDocsFailure c -> Either String c
1009
- fun1 = first $ T. unpack . showGhc
1008
+ fun1 :: Either GetDocsFailure c -> Either T. Text c
1009
+ fun1 = first showGhc
1010
1010
1011
1011
throwErrors = liftIO . throwIO . mkSrcErr
1012
1012
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ getDocumentationsTryGhc env mod names = do
75
75
Left _ -> return mempty
76
76
Right res -> fmap Map. fromList $ sequenceA $ uncurry unwrap <$> Map. toList res
77
77
where
78
- fun :: IO (Either [FileDiagnostic ] (Map. Map Name (Either String (Maybe HsDocString , Map. Map Int HsDocString ))))
78
+ fun :: IO (Either [FileDiagnostic ] (Map. Map Name (Either T. Text (Maybe HsDocString , Map. Map Int HsDocString ))))
79
79
fun = catchSrcErrors (hsc_dflags env) " docs" $ getDocsBatch env mod names
80
80
81
81
unwrap :: Name -> Either a (Maybe HsDocString , b ) -> IO (Name , SpanDoc )
You can’t perform that action at this time.
0 commit comments