-l for ghc-modi info.
This commit is contained in:
parent
e09b406ee8
commit
756d17eaa2
@ -38,17 +38,18 @@ infoExpr :: Options
|
|||||||
-> Expression -- ^ A Haskell expression.
|
-> Expression -- ^ A Haskell expression.
|
||||||
-> IO String
|
-> IO String
|
||||||
infoExpr opt cradle file expr = (++ "\n") <$> withGHCDummyFile
|
infoExpr opt cradle file expr = (++ "\n") <$> withGHCDummyFile
|
||||||
(inModuleContext opt cradle file (info file expr) "Cannot show info")
|
(inModuleContext opt cradle file (info opt file expr) "Cannot show info")
|
||||||
|
|
||||||
-- | Obtaining information of a target expression. (GHCi's info:)
|
-- | Obtaining information of a target expression. (GHCi's info:)
|
||||||
info :: FilePath -- ^ A target file.
|
info :: Options
|
||||||
|
-> FilePath -- ^ A target file.
|
||||||
-> Expression -- ^ A Haskell expression.
|
-> Expression -- ^ A Haskell expression.
|
||||||
-> Ghc String
|
-> Ghc String
|
||||||
info file expr = do
|
info opt file expr = do
|
||||||
void $ Gap.setCtx file
|
void $ Gap.setCtx file
|
||||||
sdoc <- Gap.infoThing expr
|
sdoc <- Gap.infoThing expr
|
||||||
(dflag, style) <- getFlagStyle
|
(dflag, style) <- getFlagStyle
|
||||||
return $ showPage dflag style sdoc
|
return $ convert opt $ showPage dflag style sdoc
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -256,9 +256,9 @@ showInfo :: Options
|
|||||||
showInfo opt set ls readLog fileArg = do
|
showInfo opt set ls readLog fileArg = do
|
||||||
let [file, expr] = words fileArg
|
let [file, expr] = words fileArg
|
||||||
(_, _, set') <- checkStx opt set ls readLog file
|
(_, _, set') <- checkStx opt set ls readLog file
|
||||||
msgs <- info file expr -- fixme
|
ret <- info opt file expr
|
||||||
_ <- liftIO readLog
|
_ <- liftIO readLog
|
||||||
return (msgs, True, set') -- fixme
|
return (ret, True, set')
|
||||||
|
|
||||||
showType :: Options
|
showType :: Options
|
||||||
-> Set FilePath
|
-> Set FilePath
|
||||||
|
Loading…
Reference in New Issue
Block a user