Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Haskell.Tools.Refactor.Representation
Contents
Description
Representation of modules, their collections, refactoring changes and exceptions.
Synopsis
- type UnnamedModule = Ann UModule IdDom SrcTemplateStage
- type ModuleDom = (SourceFileKey, UnnamedModule)
- data SourceFileKey = SourceFileKey {}
- data RefactorChange
- data RefactorException
- moduleSourceFile :: String -> FilePath
- sourceFileModule :: FilePath -> String
- sfkModuleName :: Lens SourceFileKey SourceFileKey String String
- sfkFileName :: Lens SourceFileKey SourceFileKey FilePath FilePath
Documentation
type UnnamedModule = Ann UModule IdDom SrcTemplateStage Source #
A type for the input and result of refactoring a module
type ModuleDom = (SourceFileKey, UnnamedModule) Source #
The name of the module and the AST
data SourceFileKey Source #
Module name and marker to separate .hs-boot module definitions. Specifies a source file in a working directory.
Constructors
SourceFileKey | |
Fields |
Instances
Eq SourceFileKey Source # | |
Defined in Language.Haskell.Tools.Refactor.Representation Methods (==) :: SourceFileKey -> SourceFileKey -> Bool # (/=) :: SourceFileKey -> SourceFileKey -> Bool # | |
Ord SourceFileKey Source # | |
Defined in Language.Haskell.Tools.Refactor.Representation Methods compare :: SourceFileKey -> SourceFileKey -> Ordering # (<) :: SourceFileKey -> SourceFileKey -> Bool # (<=) :: SourceFileKey -> SourceFileKey -> Bool # (>) :: SourceFileKey -> SourceFileKey -> Bool # (>=) :: SourceFileKey -> SourceFileKey -> Bool # max :: SourceFileKey -> SourceFileKey -> SourceFileKey # min :: SourceFileKey -> SourceFileKey -> SourceFileKey # | |
Show SourceFileKey Source # | |
Defined in Language.Haskell.Tools.Refactor.Representation Methods showsPrec :: Int -> SourceFileKey -> ShowS # show :: SourceFileKey -> String # showList :: [SourceFileKey] -> ShowS # |
data RefactorChange Source #
Change in the project, modification or removal of a module.
Constructors
ContentChanged | |
Fields | |
ModuleRemoved | |
Fields | |
ModuleCreated | |
Instances
Show RefactorChange Source # | |
Defined in Language.Haskell.Tools.Refactor.Representation Methods showsPrec :: Int -> RefactorChange -> ShowS # show :: RefactorChange -> String # showList :: [RefactorChange] -> ShowS # |
data RefactorException Source #
Exceptions that can occur while loading modules or during internal operations (not during performing the refactor).
Constructors
IllegalExtensions [String] | |
SourceCodeProblem ErrorMessages | |
UnknownException String |
Instances
Show RefactorException Source # | |
Defined in Language.Haskell.Tools.Refactor.Representation Methods showsPrec :: Int -> RefactorException -> ShowS # show :: RefactorException -> String # showList :: [RefactorException] -> ShowS # | |
Exception RefactorException Source # | |
Defined in Language.Haskell.Tools.Refactor.Representation Methods toException :: RefactorException -> SomeException # |
moduleSourceFile :: String -> FilePath Source #
Transforms module name to a .hs file name relative to the source root directory.
sourceFileModule :: FilePath -> String Source #
Transforms a source root relative file name into module name.
Orphan instances
Show ErrorMessages Source # | |
Methods showsPrec :: Int -> ErrorMessages -> ShowS # show :: ErrorMessages -> String # showList :: [ErrorMessages] -> ShowS # |