Rephrase some docs

This commit is contained in:
Daniel Gröber 2014-08-29 17:21:38 +02:00
parent 1baf56130f
commit 274b5d8e1c
2 changed files with 19 additions and 17 deletions

View File

@ -17,10 +17,10 @@ data Build = CabalPkg | SingleFile deriving Eq
setEmptyLogger :: DynFlags -> DynFlags setEmptyLogger :: DynFlags -> DynFlags
setEmptyLogger df = Gap.setLogAction df $ \_ _ _ _ _ -> return () setEmptyLogger df = Gap.setLogAction df $ \_ _ _ _ _ -> return ()
-- Fast -- * Fast
-- Friendly to foreign export -- * Friendly to foreign export
-- Not friendly to Template Haskell -- * Not friendly to -XTemplateHaskell and -XPatternSynonyms
-- Uses small memory -- * Uses little memory
setModeSimple :: DynFlags -> DynFlags setModeSimple :: DynFlags -> DynFlags
setModeSimple df = df { setModeSimple df = df {
ghcMode = CompManager ghcMode = CompManager
@ -29,10 +29,10 @@ setModeSimple df = df {
, optLevel = 0 , optLevel = 0
} }
-- Slow -- * Slow
-- Not friendly to foreign export -- * Not friendly to foreign export
-- Friendly to Template Haskell -- * Friendly to -XTemplateHaskell and -XPatternSynonyms
-- Uses large memory -- * Uses lots of memory
setModeIntelligent :: DynFlags -> DynFlags setModeIntelligent :: DynFlags -> DynFlags
setModeIntelligent df = df { setModeIntelligent df = df {
ghcMode = CompManager ghcMode = CompManager
@ -47,9 +47,9 @@ setIncludeDirs idirs df = df { importPaths = idirs }
setBuildEnv :: Build -> DynFlags -> DynFlags setBuildEnv :: Build -> DynFlags -> DynFlags
setBuildEnv build = setHideAllPackages build . setCabalPackage build setBuildEnv build = setHideAllPackages build . setCabalPackage build
-- At the moment with this option set ghc only prints different error messages, -- | With ghc-7.8 this option simply makes GHC print a message suggesting users
-- suggesting the user to add a hidden package to the build-depends in his cabal -- add hiddend packages to the build-depends field in their cabal file when the
-- file for example -- user tries to import a module form a hidden package.
setCabalPackage :: Build -> DynFlags -> DynFlags setCabalPackage :: Build -> DynFlags -> DynFlags
setCabalPackage CabalPkg df = Gap.setCabalPkg df setCabalPackage CabalPkg df = Gap.setCabalPkg df
setCabalPackage _ df = df setCabalPackage _ df = df

View File

@ -124,13 +124,15 @@ defaultState = GhcModState Simple
---------------------------------------------------------------- ----------------------------------------------------------------
-- | The GhcMod monad transformer data type. This is basically a newtype wrapper -- | This is basically a newtype wrapper around 'StateT', 'ErrorT', 'JournalT'
-- around 'StateT', 'ErrorT', 'JournalT' and 'ReaderT' with custom instances for -- and 'ReaderT' with custom instances for 'GhcMonad' and it's constraints that
-- 'GhcMonad' and it's constraints. -- means you can run (almost) all functions from the GHC API on top of 'GhcModT'
-- transparently.
-- --
-- The inner monad should have instances for 'MonadIO' and 'MonadBaseControl' -- The inner monad @m@ should have instances for 'MonadIO' and
-- 'IO'. Most @mtl@ monads already have 'MonadBaseControl' 'IO' instances, see -- 'MonadBaseControl' 'IO', in the common case this is simply 'IO'. Most @mtl@
-- the @monad-control@ package. -- monads already have 'MonadBaseControl' 'IO' instances, see the
-- @monad-control@ package.
newtype GhcModT m a = GhcModT { newtype GhcModT m a = GhcModT {
unGhcModT :: StateT GhcModState unGhcModT :: StateT GhcModState
(ErrorT GhcModError (ErrorT GhcModError