refactoring.

This commit is contained in:
Kazu Yamamoto
2014-04-26 22:51:29 +09:00
parent 9c7c6a5cf9
commit 98d3c7028c
3 changed files with 10 additions and 6 deletions

View File

@@ -29,9 +29,6 @@ import Language.Haskell.GhcMod.Types
import Outputable (PprStyle)
import TcHsSyn (hsPatType)
noWaringOptions :: [String]
noWaringOptions = ["-w:"]
----------------------------------------------------------------
-- | Obtaining information of a target expression. (GHCi's info:)
@@ -41,7 +38,7 @@ infoExpr :: Options
-> Expression -- ^ A Haskell expression.
-> IO String
infoExpr opt cradle file expr = withGHC' $ do
initializeFlagsWithCradle opt cradle noWaringOptions
initializeFlagsWithCradle opt cradle [noWaringOption]
info opt file expr
-- | Obtaining information of a target expression. (GHCi's info:)
@@ -79,7 +76,7 @@ typeExpr :: Options
-> Int -- ^ Column number.
-> IO String
typeExpr opt cradle file lineNo colNo = withGHC' $ do
initializeFlagsWithCradle opt cradle noWaringOptions
initializeFlagsWithCradle opt cradle [noWaringOption]
types opt file lineNo colNo
-- | Obtaining type of a target expression. (GHCi's type:)