Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
data
ModuleRenaming
- = ModuleRenaming [( ModuleName , ModuleName )]
- | DefaultRenaming
- | HidingRenaming [ ModuleName ]
- interpModuleRenaming :: ModuleRenaming -> ModuleName -> Maybe ModuleName
- defaultRenaming :: ModuleRenaming
- isDefaultRenaming :: ModuleRenaming -> Bool
Documentation
data ModuleRenaming Source #
Renaming applied to the modules provided by a package.
The boolean indicates whether or not to also include all of the
original names of modules. Thus,
ModuleRenaming False []
is
"don't expose any modules, and
ModuleRenaming True [(
Data.Bool
,
Bool
)]
is, "expose all modules, but also expose
Data.Bool
as
Bool
".
If a renaming is omitted you get the
DefaultRenaming
.
(NB: This is a list not a map so that we can preserve order.)
ModuleRenaming [( ModuleName , ModuleName )] |
A module renaming/thinning; e.g.,
|
DefaultRenaming |
The default renaming, bringing all exported modules into scope. |
HidingRenaming [ ModuleName ] |
Hiding renaming, e.g.,
|
Instances
interpModuleRenaming :: ModuleRenaming -> ModuleName -> Maybe ModuleName Source #
Interpret a
ModuleRenaming
as a partial map from
ModuleName
to
ModuleName
. For efficiency, you should partially apply it
with
ModuleRenaming
and then reuse it.
defaultRenaming :: ModuleRenaming Source #
The default renaming, if something is specified in
build-depends
only.
isDefaultRenaming :: ModuleRenaming -> Bool Source #
Tests if its the default renaming; we can use a more compact syntax
in
IncludeRenaming
in this case.