Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- setPragmaOptions :: PragmaOptions -> TCM ()
- checkPragmaOptionConsistency :: PragmaOptions -> PragmaOptions -> TCM ()
- setCommandLineOptions :: CommandLineOptions -> TCM ()
- setCommandLineOptions' :: AbsolutePath -> CommandLineOptions -> TCM ()
- libToTCM :: LibM a -> TCM a
- getAgdaLibFiles :: AbsolutePath -> TopLevelModuleName -> TCM [AgdaLibFile]
- getAgdaLibFilesWithoutTopLevelModuleName :: AbsolutePath -> TCM [AgdaLibFile]
- checkLibraryFileNotTooFarDown :: TopLevelModuleName -> AgdaLibFile -> TCM ()
- getLibraryOptions :: AbsolutePath -> TopLevelModuleName -> TCM [OptionsPragma]
- setLibraryPaths :: AbsolutePath -> CommandLineOptions -> TCM CommandLineOptions
- setLibraryIncludes :: CommandLineOptions -> TCM CommandLineOptions
- addDefaultLibraries :: AbsolutePath -> CommandLineOptions -> TCM CommandLineOptions
- addTrustedExecutables :: CommandLineOptions -> TCM CommandLineOptions
- setOptionsFromPragma :: OptionsPragma -> TCM ()
- checkAndSetOptionsFromPragma :: OptionsPragma -> TCM ()
- setOptionsFromPragma' :: Bool -> OptionsPragma -> TCM ()
- enableDisplayForms :: MonadTCEnv m => m a -> m a
- disableDisplayForms :: MonadTCEnv m => m a -> m a
- displayFormsEnabled :: MonadTCEnv m => m Bool
- getIncludeDirs :: HasOptions m => m [AbsolutePath]
- setIncludeDirs :: [FilePath] -> AbsolutePath -> TCM ()
- isPropEnabled :: HasOptions m => m Bool
- isLevelUniverseEnabled :: HasOptions m => m Bool
- isTwoLevelEnabled :: HasOptions m => m Bool
- hasUniversePolymorphism :: HasOptions m => m Bool
- showImplicitArguments :: HasOptions m => m Bool
- showGeneralizedArguments :: HasOptions m => m Bool
- showIrrelevantArguments :: HasOptions m => m Bool
- showIdentitySubstitutions :: HasOptions m => m Bool
- withShowAllArguments :: ReadTCState m => m a -> m a
- withShowAllArguments' :: ReadTCState m => Bool -> m a -> m a
- withoutPrintingGeneralization :: ReadTCState m => m a -> m a
- withPragmaOptions :: ReadTCState m => (PragmaOptions -> PragmaOptions) -> m a -> m a
- positivityCheckEnabled :: HasOptions m => m Bool
- typeInType :: HasOptions m => m Bool
- etaEnabled :: HasOptions m => m Bool
- maxInstanceSearchDepth :: HasOptions m => m Int
- maxInversionDepth :: HasOptions m => m Int
- getLanguage :: HasOptions m => m Language
Documentation
setPragmaOptions :: PragmaOptions -> TCM () Source #
Sets the pragma options. Checks for unsafe combinations.
checkPragmaOptionConsistency :: PragmaOptions -> PragmaOptions -> TCM () Source #
Check that that you don't turn on inconsistent options. For instance, if --a implies --b and you have both --a and --no-b. Only warn for things that have changed compared to the old options.
setCommandLineOptions :: CommandLineOptions -> TCM () Source #
Sets the command line options (both persistent and pragma options are updated).
Relative include directories are made absolute with respect to the
current working directory. If the include directories have changed
then the state is reset (partly, see setIncludeDirs
).
An empty list of relative include directories (
) is
interpreted as Left
[]["."]
.
setCommandLineOptions' Source #
:: AbsolutePath | The base directory of relative paths. |
-> CommandLineOptions | |
-> TCM () |
:: AbsolutePath | The file name. |
-> TopLevelModuleName | The top-level module name. |
-> TCM [AgdaLibFile] |
Returns the library files for a given file.
Nothing is returned if optUseLibs
is False
.
An error is raised if optUseLibs
is True
and a library file is
located too far down the directory hierarchy (see
checkLibraryFileNotTooFarDown
).
getAgdaLibFilesWithoutTopLevelModuleName Source #
:: AbsolutePath | The file. |
-> TCM [AgdaLibFile] |
Returns potential library files for a file without a known top-level module name.
Once the top-level module name is known one can use
checkLibraryFileNotTooFarDown
to check that the potential library
files were not located too far down the directory hierarchy.
Nothing is returned if optUseLibs
is False
.
checkLibraryFileNotTooFarDown :: TopLevelModuleName -> AgdaLibFile -> TCM () Source #
Checks that a library file for the module A.B.C
(say) in the
directory dirAB
is located at least two directories above the
file (not in dir/A
or dirAB
).
:: AbsolutePath | The file name. |
-> TopLevelModuleName | The top-level module name. |
-> TCM [OptionsPragma] |
Returns the library options for a given file.
:: AbsolutePath | The base directory of relative paths. |
-> CommandLineOptions | |
-> TCM CommandLineOptions |
:: AbsolutePath | The base directory of relative paths. |
-> CommandLineOptions | |
-> TCM CommandLineOptions |
setOptionsFromPragma :: OptionsPragma -> TCM () Source #
Set pragma options without checking for consistency.
checkAndSetOptionsFromPragma :: OptionsPragma -> TCM () Source #
Set pragma options and check them for consistency.
setOptionsFromPragma' :: Bool -> OptionsPragma -> TCM () Source #
enableDisplayForms :: MonadTCEnv m => m a -> m a Source #
Disable display forms.
disableDisplayForms :: MonadTCEnv m => m a -> m a Source #
Disable display forms.
displayFormsEnabled :: MonadTCEnv m => m Bool Source #
Check if display forms are enabled.
getIncludeDirs :: HasOptions m => m [AbsolutePath] Source #
Gets the include directories.
Precondition: optAbsoluteIncludePaths
must be nonempty (i.e.
setCommandLineOptions
must have run).
:: [FilePath] | New include directories. |
-> AbsolutePath | The base directory of relative paths. |
-> TCM () |
Makes the given directories absolute and stores them as include directories.
If the include directories change, then the state is reset (completely, except for the include directories and some other things).
An empty list is interpreted as ["."]
.
isPropEnabled :: HasOptions m => m Bool Source #
isLevelUniverseEnabled :: HasOptions m => m Bool Source #
isTwoLevelEnabled :: HasOptions m => m Bool Source #
hasUniversePolymorphism :: HasOptions m => m Bool Source #
showImplicitArguments :: HasOptions m => m Bool Source #
showGeneralizedArguments :: HasOptions m => m Bool Source #
showIrrelevantArguments :: HasOptions m => m Bool Source #
showIdentitySubstitutions :: HasOptions m => m Bool Source #
withShowAllArguments :: ReadTCState m => m a -> m a Source #
Switch on printing of implicit and irrelevant arguments. E.g. for reification in with-function generation.
Restores all PragmaOptions
after completion.
Thus, do not attempt to make persistent PragmaOptions
changes in a withShowAllArguments
bracket.
withShowAllArguments' :: ReadTCState m => Bool -> m a -> m a Source #
withoutPrintingGeneralization :: ReadTCState m => m a -> m a Source #
withPragmaOptions :: ReadTCState m => (PragmaOptions -> PragmaOptions) -> m a -> m a Source #
Change PragmaOptions
for a computation and restore afterwards.
positivityCheckEnabled :: HasOptions m => m Bool Source #
typeInType :: HasOptions m => m Bool Source #
etaEnabled :: HasOptions m => m Bool Source #
maxInstanceSearchDepth :: HasOptions m => m Int Source #
maxInversionDepth :: HasOptions m => m Int Source #
getLanguage :: HasOptions m => m Language Source #
Returns the Language
currently in effect.