Safe Haskell | None |
---|---|
Language | Haskell2010 |
A reader monad for determining unused code.
Synopsis
- data Mode where
- data Environment = Environment {}
- askSkip :: MonadReader Environment m => m Bool
- askLocal :: MonadReader Environment m => m Bool
- askGlobalMain :: MonadReader Environment m => m Bool
- askRoot :: MonadReader Environment m => m FilePath
- askIncludes :: MonadReader Environment m => m [AbsolutePath]
- localSkip :: MonadReader Environment m => m a -> m a
- localGlobal :: MonadReader Environment m => m a -> m a
Definition
A type indicating how checking should be done.
data Environment Source #
An environment type for use in a reader monad.
Environment | |
|
Instances
Show Environment Source # | |
Defined in Agda.Unused.Monad.Reader showsPrec :: Int -> Environment -> ShowS # show :: Environment -> String # showList :: [Environment] -> ShowS # |
Ask
askSkip :: MonadReader Environment m => m Bool Source #
Ask whether to skip checking names.
askLocal :: MonadReader Environment m => m Bool Source #
Ask whether we are in local mode.
askGlobalMain :: MonadReader Environment m => m Bool Source #
Ask whether we are in global main mode.
askRoot :: MonadReader Environment m => m FilePath Source #
Ask for the project root path.
askIncludes :: MonadReader Environment m => m [AbsolutePath] Source #
Ask for the include paths.
Local
localSkip :: MonadReader Environment m => m a -> m a Source #
Perform a local computation, but skip checking names.
localGlobal :: MonadReader Environment m => m a -> m a Source #
Perform a local computation in global mode.