Fix tests, move option records to Types module
This commit is contained in:
@@ -14,6 +14,7 @@ import qualified GHC as G
|
||||
import Language.Haskell.GhcMod.Convert
|
||||
import Language.Haskell.GhcMod.Doc (showPage, styleUnqualified)
|
||||
import Language.Haskell.GhcMod.Gap as Gap
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Language.Haskell.GhcMod.Monad
|
||||
import Language.Haskell.GhcMod.Logging
|
||||
import Name (getOccString)
|
||||
@@ -25,12 +26,6 @@ import Prelude
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
data BrowseOpts = BrowseOpts {
|
||||
optBrowseOperators :: Bool
|
||||
, optBrowseDetailed :: Bool
|
||||
, optBrowseQualified :: Bool
|
||||
}
|
||||
|
||||
-- | Getting functions, classes, etc from a module.
|
||||
-- If 'detailed' is 'True', their types are also obtained.
|
||||
-- If 'operators' is 'True', operators are also returned.
|
||||
|
||||
@@ -4,6 +4,7 @@ import Exception (ghandle)
|
||||
import Control.Exception (SomeException(..))
|
||||
import Language.Haskell.GhcMod.Logger (checkErrorPrefix)
|
||||
import Language.Haskell.GhcMod.Convert
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Language.Haskell.GhcMod.Monad
|
||||
import Language.Haskell.HLint (hlint)
|
||||
|
||||
@@ -11,8 +12,6 @@ import Language.Haskell.GhcMod.Utils (withMappedFile)
|
||||
|
||||
import Data.List (stripPrefix)
|
||||
|
||||
data LintOpts = LintOpts { optLintHlintOpts :: [String] }
|
||||
|
||||
-- | Checking syntax of a target file using hlint.
|
||||
-- Warnings and errors are returned.
|
||||
lint :: IOish m
|
||||
|
||||
@@ -373,6 +373,20 @@ instance Binary ChEntrypoint where
|
||||
put = ggput . from
|
||||
get = to `fmap` ggget
|
||||
|
||||
data LintOpts = LintOpts { optLintHlintOpts :: [String] }
|
||||
|
||||
defaultLintOpts :: LintOpts
|
||||
defaultLintOpts = LintOpts []
|
||||
|
||||
data BrowseOpts = BrowseOpts {
|
||||
optBrowseOperators :: Bool
|
||||
, optBrowseDetailed :: Bool
|
||||
, optBrowseQualified :: Bool
|
||||
}
|
||||
|
||||
defaultBrowseOpts :: BrowseOpts
|
||||
defaultBrowseOpts = BrowseOpts False False False
|
||||
|
||||
mkLabel ''GhcModCaches
|
||||
mkLabel ''GhcModState
|
||||
mkLabel ''Options
|
||||
|
||||
Reference in New Issue
Block a user