agda-unused-0.2.0: Check for unused code in an Agda project.
Safe HaskellNone
LanguageHaskell2010

Agda.Unused.Monad.Reader

Description

A reader monad for determining unused code.

Synopsis

Definition

data Mode where Source #

A type indicating how checking should be done.

Constructors

Skip :: Mode

Check nothing.

Local :: Mode

Check private items only.

Global :: Mode

Check all items.

GlobalMain :: Mode

Check imports & reject all other declarations.

Instances

Instances details
Eq Mode Source # 
Instance details

Defined in Agda.Unused.Monad.Reader

Methods

(==) :: Mode -> Mode -> Bool #

(/=) :: Mode -> Mode -> Bool #

Show Mode Source # 
Instance details

Defined in Agda.Unused.Monad.Reader

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

data Environment Source #

An environment type for use in a reader monad.

Constructors

Environment 

Fields

Instances

Instances details
Show Environment Source # 
Instance details

Defined in Agda.Unused.Monad.Reader

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.