Haddock documentation
This commit is contained in:
parent
01e1a83c25
commit
cdaf586941
@ -27,10 +27,8 @@ import Prelude
|
|||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
-- | Getting functions, classes, etc from a module.
|
-- | Getting functions, classes, etc from a module.
|
||||||
-- If 'detailed' is 'True', their types are also obtained.
|
|
||||||
-- If 'operators' is 'True', operators are also returned.
|
|
||||||
browse :: forall m. IOish m
|
browse :: forall m. IOish m
|
||||||
=> BrowseOpts
|
=> BrowseOpts -- ^ Configuration parameters
|
||||||
-> String -- ^ A module name. (e.g. \"Data.List\", "base:Prelude")
|
-> String -- ^ A module name. (e.g. \"Data.List\", "base:Prelude")
|
||||||
-> GhcModT m String
|
-> GhcModT m String
|
||||||
browse opts pkgmdl = do
|
browse opts pkgmdl = do
|
||||||
|
@ -15,7 +15,7 @@ import Data.List (stripPrefix)
|
|||||||
-- | Checking syntax of a target file using hlint.
|
-- | Checking syntax of a target file using hlint.
|
||||||
-- Warnings and errors are returned.
|
-- Warnings and errors are returned.
|
||||||
lint :: IOish m
|
lint :: IOish m
|
||||||
=> LintOpts
|
=> LintOpts -- ^ Configuration parameters
|
||||||
-> FilePath -- ^ A target file.
|
-> FilePath -- ^ A target file.
|
||||||
-> GhcModT m String
|
-> GhcModT m String
|
||||||
lint opt file =
|
lint opt file =
|
||||||
|
@ -14,7 +14,9 @@ import qualified GHC as G
|
|||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
-- | Listing installed modules.
|
-- | Listing installed modules.
|
||||||
modules :: (IOish m, Gm m) => Bool -> m String
|
modules :: (IOish m, Gm m)
|
||||||
|
=> Bool -- ^ 'detailed', if 'True', also prints packages that modules belong to.
|
||||||
|
-> m String
|
||||||
modules detailed = do
|
modules detailed = do
|
||||||
df <- runGmPkgGhc G.getSessionDynFlags
|
df <- runGmPkgGhc G.getSessionDynFlags
|
||||||
let mns = listVisibleModuleNames df
|
let mns = listVisibleModuleNames df
|
||||||
|
@ -373,17 +373,27 @@ instance Binary ChEntrypoint where
|
|||||||
put = ggput . from
|
put = ggput . from
|
||||||
get = to `fmap` ggget
|
get = to `fmap` ggget
|
||||||
|
|
||||||
data LintOpts = LintOpts { optLintHlintOpts :: [String] }
|
-- | Options for "lintWith" function
|
||||||
|
data LintOpts = LintOpts {
|
||||||
|
optLintHlintOpts :: [String]
|
||||||
|
-- ^ options that will be passed to hlint executable
|
||||||
|
}
|
||||||
|
|
||||||
|
-- | Default "LintOpts" instance
|
||||||
defaultLintOpts :: LintOpts
|
defaultLintOpts :: LintOpts
|
||||||
defaultLintOpts = LintOpts []
|
defaultLintOpts = LintOpts []
|
||||||
|
|
||||||
|
-- | Options for "browseWith" function
|
||||||
data BrowseOpts = BrowseOpts {
|
data BrowseOpts = BrowseOpts {
|
||||||
optBrowseOperators :: Bool
|
optBrowseOperators :: Bool
|
||||||
|
-- ^ If 'True', "browseWith" also returns operators.
|
||||||
, optBrowseDetailed :: Bool
|
, optBrowseDetailed :: Bool
|
||||||
|
-- ^ If 'True', "browseWith" also returns types.
|
||||||
, optBrowseQualified :: Bool
|
, optBrowseQualified :: Bool
|
||||||
|
-- ^ If 'True', "browseWith" will return fully qualified name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- | Default "BrowseOpts" instance
|
||||||
defaultBrowseOpts :: BrowseOpts
|
defaultBrowseOpts :: BrowseOpts
|
||||||
defaultBrowseOpts = BrowseOpts False False False
|
defaultBrowseOpts = BrowseOpts False False False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user