haskell-tools-rewrite-1.1.0.2: Facilities for generating new parts of the Haskell-Tools AST

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Rewrite.Match.Modules

Contents

Description

UPattern matching on UModule-level AST fragments for refactorings.

Synopsis

Documentation

pattern Module :: FilePragmaList -> MaybeModuleHead -> ImportDeclList -> DeclList -> Module Source #

The representation of a haskell module, that is a separate compilation unit. It may or may not have a header.

pattern ModuleHead :: ModuleName -> MaybeModulePragma -> MaybeExportSpecs -> ModuleHead Source #

Module declaration with name and (optional) exports

pattern ExportSpecs :: ExportSpecList -> ExportSpecs Source #

A list of export specifications surrounded by parentheses

pattern ExportSpec :: IESpec -> ExportSpec Source #

Export a name and related names

pattern ModuleExport :: ModuleName -> ExportSpec Source #

The export of an imported module ( module A )

pattern IESpec :: MaybeImportModifier -> Name -> MaybeSubSpec -> IESpec Source #

Marks a name to be imported or exported with related names (subspecifier)

pattern SubAll :: SubSpec Source #

(..): a class exported with all of its methods, or a datatype exported with all of its constructors.

pattern SubList :: NameList -> SubSpec Source #

(a,b,c): a class exported with some of its methods, or a datatype exported with some of its constructors.

Pragmas

pattern LanguagePragma :: LanguageExtensionList -> FilePragma Source #

LANGUAGE pragma, listing the enabled language extensions in that file

pattern OptionsPragma :: String -> FilePragma Source #

OPTIONS pragma, possibly qualified with a tool, e.g. OPTIONS_GHC

pattern LanguageExtension :: String -> LanguageExtension Source #

The name of the enabled language extension, for example ( LambdaCase )

pattern ModuleWarningPragma :: StringNodeList -> ModulePragma Source #

A warning pragma attached to the module

pattern ModuleDeprecatedPragma :: StringNodeList -> ModulePragma Source #

A deprecated pragma attached to the module