File tree 2 files changed +5
-5
lines changed
ghcide/src/Development/IDE 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -965,19 +965,19 @@ getDocsBatch
965
965
:: HscEnv
966
966
-> Module -- ^ a moudle where the names are in scope
967
967
-> [Name ]
968
- -> IO (Map. Map Name (Either String (Maybe HsDocString , Map. Map Int HsDocString )))
968
+ -> IO (Map. Map Name (Either T. Text (Maybe HsDocString , Map. Map Int HsDocString )))
969
969
getDocsBatch hsc_env _mod _names = do
970
970
((_warns,errs), res) <- initTc hsc_env HsSrcFile False _mod fakeSpan $ Map. fromList <$> traverse findNameInfo _names
971
971
case res of
972
972
Just x -> return $ fun x
973
973
Nothing -> throwErrors errs
974
974
where
975
- fun :: Map. Map Name (Either GetDocsFailure c ) -> Map. Map Name (Either String c )
975
+ fun :: Map. Map Name (Either GetDocsFailure c ) -> Map. Map Name (Either T. Text c )
976
976
fun =
977
977
Map. map fun1
978
978
where
979
- fun1 :: Either GetDocsFailure c -> Either String c
980
- fun1 = first $ T. unpack . showGhc
979
+ fun1 :: Either GetDocsFailure c -> Either T. Text c
980
+ fun1 = first showGhc
981
981
982
982
throwErrors = liftIO . throwIO . mkSrcErr
983
983
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