haskell-tools-rewrite-1.0.1.1: 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 #

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 #

Module declaration with name and (optional) exports

pattern ExportSpecs :: ExportSpecList -> ExportSpecs #

A list of export specifications surrounded by parentheses

pattern ExportSpec :: IESpec -> ExportSpec #

Export a name and related names

pattern ModuleExport :: ModuleName -> ExportSpec #

The export of an imported module ( module A )

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

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

pattern SubAll :: SubSpec #

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

pattern SubList :: NameList -> SubSpec #

(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 #

LANGUAGE pragma, listing the enabled language extensions in that file

pattern OptionsPragma :: String -> FilePragma #

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

pattern LanguageExtension :: String -> LanguageExtension #

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

pattern ModuleWarningPragma :: StringNodeList -> ModulePragma #

A warning pragma attached to the module

pattern ModuleDeprecatedPragma :: StringNodeList -> ModulePragma #

A deprecated pragma attached to the module