src/Extract.hs:185:27: error:
• Couldn't match expected type: Maybe a0 -> IO HscEnv
with actual type: IO HscEnv
• The function ‘initializePlugins’
is applied to two value arguments,
but its type ‘HscEnv -> IO HscEnv’ has only one
In the first argument of ‘liftIO’, namely
‘(initializePlugins hsc_env Nothing)’
In a stmt of a 'do' block:
hsc_env' <- liftIO (initializePlugins hsc_env Nothing)
|
185 | hsc_env' <- liftIO (initializePlugins hsc_env Nothing)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Extract.hs:230:56: error:
Variable not in scope: unpackHDS :: HsDoc GhcPs -> String
Suggested fix: Perhaps use ‘unpackHDSC’ (imported from GHC)
|
230 | docStringsFromModule mod = map (fmap (toLocated . fmap unpackHDS)) docs
| ^^^^^^^^^
src/Extract.hs:235:26: error:
• Couldn't match type: GenLocated SrcSpan (HsDoc GhcPs)
with: WithHsDocIdentifiers HsDocString GhcPs
Expected: [(Maybe String, LHsDoc GhcPs)]
Actual: [(Maybe String, GenLocated SrcSpan (LHsDoc GhcPs))]
• In the first argument of ‘(++)’, namely ‘exports’
In the second argument of ‘(++)’, namely ‘exports ++ decls’
In the expression: header ++ exports ++ decls
|
235 | docs = header ++ exports ++ decls
| ^^^^^^^
src/Extract.hs:235:37: error:
• Couldn't match type ‘HsDocString’
with ‘WithHsDocIdentifiers HsDocString GhcPs’
Expected: [(Maybe String, LHsDoc GhcPs)]
Actual: [(Maybe String, LHsDocString)]
• In the second argument of ‘(++)’, namely ‘decls’
In the second argument of ‘(++)’, namely ‘exports ++ decls’
In the expression: header ++ exports ++ decls
|
235 | docs = header ++ exports ++ decls
| ^^^^^
src/Extract.hs:322:31: error:
• Expecting one more argument to ‘DocDecl’
Expected a type, but ‘DocDecl’ has kind ‘* -> *’
• In the type signature:
fromDocDecl :: SrcSpan -> DocDecl -> (Maybe String, LHsDocString)
In an equation for ‘extractDocStrings’:
extractDocStrings
= everythingBut
(++)
(([], False) `mkQ` fromLHsDecl `extQ` fromLDocDecl
`extQ` fromLHsDocString)
where
fromLHsDecl :: Selector (LHsDecl GhcPs)
fromLHsDecl (L loc decl)
= case decl of
DocD _ x -> select (fromDocDecl (locA loc) x)
_ -> ...
fromLDocDecl :: Selector (LDocDecl GhcPs)
fromLDocDecl (L loc x) = select (fromDocDecl (locA loc) x)
....
|
322 | fromDocDecl :: SrcSpan -> DocDecl -> (Maybe String, LHsDocString)
Removing version constraints to upgrade gave me:
Any idea about that one? Thanks!