-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Refactoring Tool for Haskell -- -- Contains a set of refactorings based on the Haskell-Tools framework to -- easily transform a Haskell program. For the descriptions of the -- implemented refactorings, see the homepage. @package haskell-tools-refactor @version 1.1.0.2 -- | Representation of modules, their collections, refactoring changes and -- exceptions. module Language.Haskell.Tools.Refactor.Representation -- | A type for the input and result of refactoring a module type UnnamedModule = Ann UModule IdDom SrcTemplateStage -- | The name of the module and the AST type ModuleDom = (SourceFileKey, UnnamedModule) -- | Module name and marker to separate .hs-boot module definitions. -- Specifies a source file in a working directory. data SourceFileKey SourceFileKey :: FilePath -> String -> SourceFileKey [_sfkFileName] :: SourceFileKey -> FilePath [_sfkModuleName] :: SourceFileKey -> String -- | Change in the project, modification or removal of a module. data RefactorChange ContentChanged :: ModuleDom -> RefactorChange [fromContentChanged] :: RefactorChange -> ModuleDom ModuleRemoved :: String -> RefactorChange [removedModuleName] :: RefactorChange -> String ModuleCreated :: String -> UnnamedModule -> SourceFileKey -> RefactorChange [createdModuleName] :: RefactorChange -> String [createdModuleContent] :: RefactorChange -> UnnamedModule [sameLocation] :: RefactorChange -> SourceFileKey -- | Exceptions that can occur while loading modules or during internal -- operations (not during performing the refactor). data RefactorException IllegalExtensions :: [String] -> RefactorException SourceCodeProblem :: ErrorMessages -> RefactorException UnknownException :: String -> RefactorException -- | Transforms module name to a .hs file name relative to the source root -- directory. moduleSourceFile :: String -> FilePath -- | Transforms a source root relative file name into module name. sourceFileModule :: FilePath -> String sfkModuleName :: Lens SourceFileKey SourceFileKey String String sfkFileName :: Lens SourceFileKey SourceFileKey FilePath FilePath instance GHC.Show.Show Language.Haskell.Tools.Refactor.Representation.RefactorException instance GHC.Show.Show Language.Haskell.Tools.Refactor.Representation.SourceFileKey instance GHC.Classes.Ord Language.Haskell.Tools.Refactor.Representation.SourceFileKey instance GHC.Classes.Eq Language.Haskell.Tools.Refactor.Representation.SourceFileKey instance GHC.Exception.Exception Language.Haskell.Tools.Refactor.Representation.RefactorException instance GHC.Show.Show Language.Haskell.Tools.Refactor.Representation.RefactorChange instance GHC.Show.Show ErrUtils.ErrorMessages -- | Types and instances for monadic refactorings. The refactoring monad -- provides automatic importing, keeping important source fragments (such -- as preprocessor pragmas), and providing contextual information for -- refactorings. module Language.Haskell.Tools.Refactor.Monad -- | A monad that can be used to refactor class Monad m => RefactorMonad m refactError :: RefactorMonad m => String -> m a liftGhc :: RefactorMonad m => Ghc a -> m a -- | A refactoring that only affects one module type LocalRefactoring = UnnamedModule -> LocalRefactor UnnamedModule -- | The type of a refactoring type Refactoring = ModuleDom -> [ModuleDom] -> Refactor [RefactorChange] -- | The type of a refactoring that affects the whole project. type ProjectRefactoring = [ModuleDom] -> Refactor [RefactorChange] -- | The refactoring monad for a given module type LocalRefactor = LocalRefactorT Refactor -- | The refactoring monad for the whole project type Refactor = ExceptT String Ghc -- | Input and output information for the refactoring TODO: use multiple -- states instead of Either newtype LocalRefactorT m a LocalRefactorT :: WriterT [Either Name (SrcSpan, String, String)] (ReaderT RefactorCtx m) a -> LocalRefactorT m a [fromRefactorT] :: LocalRefactorT m a -> WriterT [Either Name (SrcSpan, String, String)] (ReaderT RefactorCtx m) a -- | The information a refactoring can use data RefactorCtx RefactorCtx :: Module -> Ann UModule IdDom SrcTemplateStage -> [Ann UImportDecl IdDom SrcTemplateStage] -> RefactorCtx -- | The name of the module being refactored. Used for accessing implicit -- imports. [refModuleName] :: RefactorCtx -> Module [refCtxRoot] :: RefactorCtx -> Ann UModule IdDom SrcTemplateStage [refCtxImports] :: RefactorCtx -> [Ann UImportDecl IdDom SrcTemplateStage] instance GhcMonad.GhcMonad m => GhcMonad.GhcMonad (Language.Haskell.Tools.Refactor.Monad.LocalRefactorT m) instance Exception.ExceptionMonad m => Exception.ExceptionMonad (Language.Haskell.Tools.Refactor.Monad.LocalRefactorT m) instance (GHC.Base.Monad m, DynFlags.HasDynFlags m) => DynFlags.HasDynFlags (Language.Haskell.Tools.Refactor.Monad.LocalRefactorT m) instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Language.Haskell.Tools.Refactor.Monad.LocalRefactorT m) instance GHC.Base.Monad m => Control.Monad.Writer.Class.MonadWriter [Data.Either.Either Name.Name (SrcLoc.SrcSpan, GHC.Base.String, GHC.Base.String)] (Language.Haskell.Tools.Refactor.Monad.LocalRefactorT m) instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader Language.Haskell.Tools.Refactor.Monad.RefactorCtx (Language.Haskell.Tools.Refactor.Monad.LocalRefactorT m) instance GHC.Base.Monad m => GHC.Base.Monad (Language.Haskell.Tools.Refactor.Monad.LocalRefactorT m) instance GHC.Base.Applicative m => GHC.Base.Applicative (Language.Haskell.Tools.Refactor.Monad.LocalRefactorT m) instance GHC.Base.Functor m => GHC.Base.Functor (Language.Haskell.Tools.Refactor.Monad.LocalRefactorT m) instance Language.Haskell.Tools.Refactor.Monad.RefactorMonad Language.Haskell.Tools.Refactor.Monad.LocalRefactor instance Control.Monad.Trans.Class.MonadTrans Language.Haskell.Tools.Refactor.Monad.LocalRefactorT instance Language.Haskell.Tools.Refactor.Monad.RefactorMonad Language.Haskell.Tools.Refactor.Monad.Refactor instance Language.Haskell.Tools.Refactor.Monad.RefactorMonad m => Language.Haskell.Tools.Refactor.Monad.RefactorMonad (Control.Monad.Trans.State.Strict.StateT s m) instance Language.Haskell.Tools.Refactor.Monad.RefactorMonad m => Language.Haskell.Tools.Refactor.Monad.RefactorMonad (Control.Monad.Trans.State.Lazy.StateT s m) instance (GhcMonad.GhcMonad m, GHC.Base.Monoid s) => GhcMonad.GhcMonad (Control.Monad.Trans.Writer.Lazy.WriterT s m) instance (Exception.ExceptionMonad m, GHC.Base.Monoid s) => Exception.ExceptionMonad (Control.Monad.Trans.Writer.Lazy.WriterT s m) instance (GHC.Base.Monad m, DynFlags.HasDynFlags m) => DynFlags.HasDynFlags (Control.Monad.Trans.State.Strict.StateT s m) instance GhcMonad.GhcMonad m => GhcMonad.GhcMonad (Control.Monad.Trans.State.Strict.StateT s m) instance Exception.ExceptionMonad m => Exception.ExceptionMonad (Control.Monad.Trans.State.Strict.StateT s m) instance (GHC.Base.Monad m, DynFlags.HasDynFlags m) => DynFlags.HasDynFlags (Control.Monad.Trans.State.Lazy.StateT s m) instance GhcMonad.GhcMonad m => GhcMonad.GhcMonad (Control.Monad.Trans.State.Lazy.StateT s m) instance Exception.ExceptionMonad m => Exception.ExceptionMonad (Control.Monad.Trans.State.Lazy.StateT s m) instance GhcMonad.GhcMonad m => GhcMonad.GhcMonad (Control.Monad.Trans.Reader.ReaderT s m) instance Exception.ExceptionMonad m => Exception.ExceptionMonad (Control.Monad.Trans.Reader.ReaderT s m) instance GhcMonad.GhcMonad m => GhcMonad.GhcMonad (Control.Monad.Trans.Except.ExceptT s m) instance Exception.ExceptionMonad m => Exception.ExceptionMonad (Control.Monad.Trans.Except.ExceptT s m) instance Exception.ExceptionMonad m => Exception.ExceptionMonad (Control.Monad.Trans.Maybe.MaybeT m) -- | Operations for changing the AST module Language.Haskell.Tools.Refactor.Utils.AST -- | Remove an element from the AST while keeping the textual parts of it -- that should not be removed (like preprocessor pragmas). removeChild :: (SourceInfoTraversal e) => e dom SrcTemplateStage -> LocalRefactor () -- | Remove a separator from the AST while keeping the textual parts of it -- that should not be removed (like preprocessor pragmas). removeSeparator :: ([SourceTemplateTextElem], SrcSpan) -> LocalRefactor () -- | Utilities for transformations that work on both top-level and local -- definitions module Language.Haskell.Tools.Refactor.Utils.BindingElem -- | A type class for handling definitions that can appear as both -- top-level and local definitions class NamedElement d => BindingElem d -- | Accesses a type signature definition in a local or top-level -- definition sigBind :: BindingElem d => Simple Partial (Ann d IdDom SrcTemplateStage) TypeSignature -- | Accesses a value or function definition in a local or top-level -- definition valBind :: BindingElem d => Simple Partial (Ann d IdDom SrcTemplateStage) ValueBind -- | Accesses a type signature definition in a local or top-level -- definition fixitySig :: BindingElem d => Simple Partial (Ann d IdDom SrcTemplateStage) FixitySignature -- | Creates a new definition from a type signature createTypeSig :: BindingElem d => TypeSignature -> Ann d IdDom SrcTemplateStage -- | Creates a new definition from a value or function definition createBinding :: BindingElem d => ValueBind -> Ann d IdDom SrcTemplateStage -- | Creates a new fixity signature createFixitySig :: BindingElem d => FixitySignature -> Ann d IdDom SrcTemplateStage -- | Checks if a given definition is a type signature isTypeSig :: BindingElem d => Ann d IdDom SrcTemplateStage -> Bool -- | Checks if a given definition is a function or value binding isBinding :: BindingElem d => Ann d IdDom SrcTemplateStage -> Bool -- | Checks if a given definition is a fixity signature isFixitySig :: BindingElem d => Ann d IdDom SrcTemplateStage -> Bool getValBindInList :: BindingElem d => RealSrcSpan -> AnnList d -> Maybe ValueBind valBindsInList :: BindingElem d => Simple Traversal (AnnList d) ValueBind instance Language.Haskell.Tools.Refactor.Utils.BindingElem.BindingElem Language.Haskell.Tools.AST.Representation.Decls.UDecl instance Language.Haskell.Tools.Refactor.Utils.BindingElem.BindingElem Language.Haskell.Tools.AST.Representation.Binds.ULocalBind module Language.Haskell.Tools.Refactor.Utils.Debug debugM :: (Monad m, Show a) => m a -> m a debug :: Show a => a -> a -- | Displays True iff the wrapped value is a Just debugMaybeT :: Monad m => MaybeT m a -> MaybeT m a showOutputable :: Outputable a => a -> String showName :: Name -> String showOp :: Operator -> String module Language.Haskell.Tools.Refactor.Utils.Extensions -- | Expands an extension into all the extensions it implies (keeps -- original as well) expandExtension :: Extension -> [Extension] -- | Replaces deprecated extensions with their new counterpart replaceDeprecated :: Extension -> Extension turnOn :: Bool turnOff :: Bool impliedXFlags :: [(Extension, Bool, Extension)] -- | These extensions' GHC representation name differs from their actual -- name irregularExtensions :: [(String, String)] -- | Canonicalize extensions. This is a helper function for parsing -- extensions This way we can say read . canonExt to parse any -- extension string canonExt :: String -> String -- | Serializes the extension's GHC name into its LANGUAGE pragma name. -- Should be always used in composition with show (seriealizeExt . -- show) when refactoring extensions. This function also replaces -- depracted extensions with their new versions. serializeExt :: String -> String -- | Map the cabal extensions to the ones that GHC recognizes translateExtension :: KnownExtension -> Maybe Extension -- | The language extensions known to GHC. -- -- Note that there is an orphan Binary instance for this type -- supplied by the GHC.LanguageExtensions module provided by -- ghc-boot. We can't provide here as this would require adding -- transitive dependencies to the template-haskell package, -- which must have a minimal dependency set. data Extension Cpp :: Extension OverlappingInstances :: Extension UndecidableInstances :: Extension IncoherentInstances :: Extension UndecidableSuperClasses :: Extension MonomorphismRestriction :: Extension MonoPatBinds :: Extension MonoLocalBinds :: Extension RelaxedPolyRec :: Extension ExtendedDefaultRules :: Extension ForeignFunctionInterface :: Extension UnliftedFFITypes :: Extension InterruptibleFFI :: Extension CApiFFI :: Extension GHCForeignImportPrim :: Extension JavaScriptFFI :: Extension ParallelArrays :: Extension Arrows :: Extension TemplateHaskell :: Extension TemplateHaskellQuotes :: Extension QuasiQuotes :: Extension ImplicitParams :: Extension ImplicitPrelude :: Extension ScopedTypeVariables :: Extension AllowAmbiguousTypes :: Extension UnboxedTuples :: Extension UnboxedSums :: Extension BangPatterns :: Extension TypeFamilies :: Extension TypeFamilyDependencies :: Extension TypeInType :: Extension OverloadedStrings :: Extension OverloadedLists :: Extension NumDecimals :: Extension DisambiguateRecordFields :: Extension RecordWildCards :: Extension RecordPuns :: Extension ViewPatterns :: Extension GADTs :: Extension GADTSyntax :: Extension NPlusKPatterns :: Extension DoAndIfThenElse :: Extension RebindableSyntax :: Extension ConstraintKinds :: Extension PolyKinds :: Extension DataKinds :: Extension InstanceSigs :: Extension ApplicativeDo :: Extension StandaloneDeriving :: Extension DeriveDataTypeable :: Extension AutoDeriveTypeable :: Extension DeriveFunctor :: Extension DeriveTraversable :: Extension DeriveFoldable :: Extension DeriveGeneric :: Extension DefaultSignatures :: Extension DeriveAnyClass :: Extension DeriveLift :: Extension DerivingStrategies :: Extension TypeSynonymInstances :: Extension FlexibleContexts :: Extension FlexibleInstances :: Extension ConstrainedClassMethods :: Extension MultiParamTypeClasses :: Extension NullaryTypeClasses :: Extension FunctionalDependencies :: Extension UnicodeSyntax :: Extension ExistentialQuantification :: Extension MagicHash :: Extension EmptyDataDecls :: Extension KindSignatures :: Extension RoleAnnotations :: Extension ParallelListComp :: Extension TransformListComp :: Extension MonadComprehensions :: Extension GeneralizedNewtypeDeriving :: Extension RecursiveDo :: Extension PostfixOperators :: Extension TupleSections :: Extension PatternGuards :: Extension LiberalTypeSynonyms :: Extension RankNTypes :: Extension ImpredicativeTypes :: Extension TypeOperators :: Extension ExplicitNamespaces :: Extension PackageImports :: Extension ExplicitForAll :: Extension AlternativeLayoutRule :: Extension AlternativeLayoutRuleTransitional :: Extension DatatypeContexts :: Extension NondecreasingIndentation :: Extension RelaxedLayout :: Extension TraditionalRecordSyntax :: Extension LambdaCase :: Extension MultiWayIf :: Extension BinaryLiterals :: Extension NegativeLiterals :: Extension HexFloatLiterals :: Extension DuplicateRecordFields :: Extension OverloadedLabels :: Extension EmptyCase :: Extension PatternSynonyms :: Extension PartialTypeSignatures :: Extension NamedWildCards :: Extension StaticPointers :: Extension TypeApplications :: Extension Strict :: Extension StrictData :: Extension MonadFailDesugaring :: Extension EmptyDataDeriving :: Extension -- | Utilities to modify the indentation of AST fragments module Language.Haskell.Tools.Refactor.Utils.Indentation -- | Set the minimal indentation recursively for a part of the AST setMinimalIndent :: SourceInfoTraversal elem => Int -> elem dom SrcTemplateStage -> elem dom SrcTemplateStage -- | Defines operation on AST lists. AST lists carry source information so -- simple list modification is not enough. module Language.Haskell.Tools.Refactor.Utils.Lists -- | Filters the elements of the list. By default it removes the separator -- before the element. Of course, if the first element is removed, the -- following separator is removed as well. filterList :: SourceInfoTraversal e => (Ann e IdDom SrcTemplateStage -> Bool) -> AnnList e -> AnnList e filterListIndexed :: SourceInfoTraversal e => (Int -> Ann e IdDom SrcTemplateStage -> Bool) -> AnnList e -> AnnList e -- | A version of filterList that cares about keeping non-removable code -- elements (like preprocessor pragmas) filterListSt :: SourceInfoTraversal e => (Ann e IdDom SrcTemplateStage -> Bool) -> AnnList e -> LocalRefactor (AnnList e) -- | A version of filterListIndexed that cares about keeping non-removable -- code elements (like preprocessor pragmas) filterListIndexedSt :: SourceInfoTraversal e => (Int -> Ann e IdDom SrcTemplateStage -> Bool) -> AnnList e -> LocalRefactor (AnnList e) -- | Selects the given indices from a list sublist :: [Int] -> [a] -> [a] -- | Selects all but the given indices from a list notSublist :: [Int] -> [a] -> [a] -- | Inserts the element in the places where the two positioning functions -- (one checks the element before, one the element after) allows the -- placement. insertWhere :: Bool -> Ann e IdDom SrcTemplateStage -> (Maybe (Ann e IdDom SrcTemplateStage) -> Bool) -> (Maybe (Ann e IdDom SrcTemplateStage) -> Bool) -> AnnList e -> AnnList e -- | Checks where the element will be inserted given the two positioning -- functions. insertIndex :: (Maybe (Ann e IdDom SrcTemplateStage) -> Bool) -> (Maybe (Ann e IdDom SrcTemplateStage) -> Bool) -> [Ann e IdDom SrcTemplateStage] -> Maybe Int -- | Gets the elements and separators from a list. The first separator is -- zipped to the second element. To the first element, the "" string is -- zipped. zipWithSeparators :: AnnList e -> [(([SourceTemplateTextElem], SrcSpan), Ann e IdDom SrcTemplateStage)] -- | Helper functions for defining refactorings. module Language.Haskell.Tools.Refactor.Utils.Helpers replaceWithJust :: Ann e IdDom SrcTemplateStage -> AnnMaybe e -> AnnMaybe e replaceWithNothing :: AnnMaybe e -> AnnMaybe e -- | Remove the container (where or let) when the last binding is removed. removeEmptyBnds :: Simple Traversal Module ValueBind -> Simple Traversal Module Expr -> Module -> Module -- | Puts the elements in the orginal order and remove duplicates (elements -- with the same source range) normalizeElements :: [Ann e dom SrcTemplateStage] -> [Ann e dom SrcTemplateStage] -- | Groups elements together into equivalence groups. groupElemsBy :: Ord k => (a -> k) -> [a] -> [[a]] -- | Chooses a representative element for each equivalence group, and pairs -- them with their corresponding group. reprElems :: [[a]] -> [(a, [a])] -- | Sorts the elements of a list into equivalence groups based on a -- function, then chooses a representative element for each group, and -- pairs them with their corresponding group. equivalenceGroupsBy :: Ord k => (a -> k) -> [a] -> [(a, [a])] module Language.Haskell.Tools.Refactor.Utils.Maybe isJustT :: Monad m => MaybeT m a -> m Bool isNothingT :: Monad m => MaybeT m a -> m Bool liftMaybe :: Monad m => Maybe a -> MaybeT m a fromMaybeT :: Monad m => a -> MaybeT m a -> m a fromMaybeTM :: Monad m => m a -> MaybeT m a -> m a maybeT :: Monad m => b -> (a -> b) -> MaybeT m a -> m b maybeTM :: Monad m => m b -> (a -> m b) -> MaybeT m a -> m b -- | The parameterizable maybe monad, obtained by composing an arbitrary -- monad with the Maybe monad. -- -- Computations are actions that may produce a value or exit. -- -- The return function yields a computation that produces that -- value, while >>= sequences two subcomputations, exiting -- if either computation does. newtype MaybeT (m :: * -> *) a MaybeT :: m Maybe a -> MaybeT a [runMaybeT] :: MaybeT a -> m Maybe a -- | Basic utilities and types for defining refactorings. module Language.Haskell.Tools.Refactor.Utils.Monadic -- | Performs the given refactoring, transforming it into a Ghc action runRefactor :: ModuleDom -> [ModuleDom] -> Refactoring -> Ghc (Either String [RefactorChange]) -- | Wraps a refactoring that only affects one module. Performs the -- per-module finishing touches. localRefactoring :: LocalRefactoring -> Refactoring -- | Transform the result of the local refactoring localRefactoringRes :: ((UnnamedModule -> UnnamedModule) -> a -> a) -> UnnamedModule -> LocalRefactor a -> Refactor a -- | Re-inserts the elements removed from the AST that should be kept (for -- example preprocessor directives) insertText :: SourceInfoTraversal p => [(SrcSpan, String, String)] -> p dom SrcTemplateStage -> p dom SrcTemplateStage -- | Adds the imports that bring names into scope that are needed by the -- refactoring addGeneratedImports :: [Name] -> Module -> Module registeredNamesFromPrelude :: [Name] otherNamesFromPrelude :: [String] qualifiedName :: Name -> String referenceName :: Name -> LocalRefactor (Ann UName IdDom SrcTemplateStage) referenceOperator :: Name -> LocalRefactor (Ann UOperator IdDom SrcTemplateStage) -- | Create a name that references the definition. Generates an import if -- the definition is not yet imported. referenceName' :: ([String] -> Name -> Ann nt IdDom SrcTemplateStage) -> Name -> LocalRefactor (Ann nt IdDom SrcTemplateStage) -- | Reference the name by the shortest suitable import referenceBy :: ([String] -> Name -> Ann nt IdDom SrcTemplateStage) -> Name -> [Ann UImportDecl IdDom SrcTemplateStage] -> Ann nt IdDom SrcTemplateStage -- | Defines utility methods that prepare Haskell modules for refactoring module Language.Haskell.Tools.Refactor.Prepare -- | Type synonym for module names. type ModuleName = String -- | A quick function to try the refactorings tryRefactor :: (RealSrcSpan -> Refactoring) -> String -> ModuleName -> IO () -- | Adjust the source range to be applied to the refactored module correctRefactorSpan :: UnnamedModule -> RealSrcSpan -> RealSrcSpan -- | Set the given flags for the GHC session. Also gives back a change -- function that you can use to apply the settings to any flags. Prints -- out errors and warnings useFlags :: [String] -> Ghc ([String], DynFlags -> DynFlags) pprWarning :: Warn -> SDoc pprErr :: Err -> SDoc -- | Reloads the package database based on the session flags reloadPkgDb :: Ghc () -- | Initialize GHC flags to default values that support refactoring initGhcFlags :: Ghc () initGhcFlagsForTest :: Ghc () -- | Sets up basic flags and settings for GHC initGhcFlags' :: Bool -> Bool -> Ghc () -- | Use the given source directories when searching for imported modules useDirs :: [FilePath] -> Ghc () -- | Don't use the given source directories when searching for imported -- modules deregisterDirs :: [FilePath] -> Ghc () -- | Translates module name and working directory into the name of the file -- where the given module should be defined toFileName :: FilePath -> ModuleName -> FilePath -- | Translates module name and working directory into the name of the file -- where the boot module should be defined toBootFileName :: FilePath -> ModuleName -> FilePath -- | Get the source directory where the module is located. getSourceDir :: ModSummary -> IO FilePath -- | Gets the path to the source file of the module. getModSumOrig :: ModSummary -> FilePath keyFromMS :: ModSummary -> SourceFileKey -- | Gets the module name getModSumName :: ModSummary -> String -- | Load the AST of a module given by the working directory and module -- name. loadModuleAST :: FilePath -> ModuleName -> Ghc TypedModule -- | Load the summary of a module given by the working directory and module -- name. loadModule :: FilePath -> ModuleName -> Ghc ModSummary -- | The final version of our AST, with type infromation added type TypedModule = Ann UModule IdDom SrcTemplateStage -- | Get the typed representation of a Haskell module. parseTyped :: ModSummary -> Ghc TypedModule data UnsupportedExtension UnsupportedExtension :: String -> UnsupportedExtension trfProblem :: String -> a -- | Modifies the dynamic flags for performing a ghc task withAlteredDynFlags :: GhcMonad m => (DynFlags -> m DynFlags) -> m a -> m a -- | Forces the code generation for a given module forceCodeGen :: ModSummary -> ModSummary codeGenDfs :: DynFlags -> DynFlags -- | Forces ASM code generation for a given module forceAsmGen :: ModSummary -> ModSummary -- | Normalizes the flags for a module summary modSumNormalizeFlags :: ModSummary -> ModSummary -- | Removes all flags that are unintelligable for refactoring normalizeFlags :: DynFlags -> DynFlags -- | Read a source range from our textual format: -- line:col-line:col or line:col readSrcSpan :: String -> RealSrcSpan -- | Read a source location from our format: line:col readSrcLoc :: String -> RealSrcLoc instance GHC.Show.Show Language.Haskell.Tools.Refactor.Prepare.UnsupportedExtension instance GHC.Exception.Exception Language.Haskell.Tools.Refactor.Prepare.UnsupportedExtension -- | Defines a representation to represent refactorings that can be -- executed on the codebase. Refactorings are differentiated on their -- signatures (inputs needed to execute). module Language.Haskell.Tools.Refactor.Refactoring -- | The signature and behavior of one refactoring that can be executed. data RefactoringChoice NamingRefactoring :: String -> RealSrcSpan -> String -> Refactoring -> RefactoringChoice [refactoringName] :: RefactoringChoice -> String [namingRefactoring] :: RefactoringChoice -> RealSrcSpan -> String -> Refactoring SelectionRefactoring :: String -> RealSrcSpan -> Refactoring -> RefactoringChoice [refactoringName] :: RefactoringChoice -> String [selectionRefactoring] :: RefactoringChoice -> RealSrcSpan -> Refactoring ModuleRefactoring :: String -> Refactoring -> RefactoringChoice [refactoringName] :: RefactoringChoice -> String [moduleRefactoring] :: RefactoringChoice -> Refactoring ProjectRefactoring :: String -> ProjectRefactoring -> RefactoringChoice [refactoringName] :: RefactoringChoice -> String [projectRefactoring] :: RefactoringChoice -> ProjectRefactoring -- | Executes a given command (choosen from the set of available -- refactorings) on the selected module and given other modules. performCommand :: [RefactoringChoice] -> [String] -> Either FilePath ModuleDom -> [ModuleDom] -> Ghc (Either String [RefactorChange]) -- | Gets the name of possible refactorings. refactorCommands :: [RefactoringChoice] -> [String] module Language.Haskell.Tools.Refactor.Querying type QueryType = String type QueryMonad = ExceptT String Ghc data QueryValue GeneralQuery :: Value -> QueryValue MarkerQuery :: [Marker] -> QueryValue data QueryChoice LocationQuery :: String -> RealSrcSpan -> ModuleDom -> [ModuleDom] -> QueryMonad QueryValue -> QueryChoice [queryName] :: QueryChoice -> String [locationQuery] :: QueryChoice -> RealSrcSpan -> ModuleDom -> [ModuleDom] -> QueryMonad QueryValue GlobalQuery :: String -> ModuleDom -> [ModuleDom] -> QueryMonad QueryValue -> QueryChoice [queryName] :: QueryChoice -> String [globalQuery] :: QueryChoice -> ModuleDom -> [ModuleDom] -> QueryMonad QueryValue data Marker Marker :: SrcSpan -> Severity -> String -> Marker [location] :: Marker -> SrcSpan [severity] :: Marker -> Severity [message] :: Marker -> String data Severity Error :: Severity Warning :: Severity Info :: Severity decompQuery :: QueryValue -> (QueryType, Value) queryCommands :: [QueryChoice] -> [String] queryError :: String -> QueryMonad a performQuery :: [QueryChoice] -> [String] -> Either FilePath ModuleDom -> [ModuleDom] -> Ghc (Either String (QueryType, Value)) instance GHC.Classes.Eq Language.Haskell.Tools.Refactor.Querying.QueryValue instance GHC.Show.Show Language.Haskell.Tools.Refactor.Querying.QueryValue instance GHC.Generics.Generic Language.Haskell.Tools.Refactor.Querying.QueryValue instance GHC.Classes.Eq Language.Haskell.Tools.Refactor.Querying.Marker instance GHC.Generics.Generic Language.Haskell.Tools.Refactor.Querying.Marker instance GHC.Classes.Eq Language.Haskell.Tools.Refactor.Querying.Severity instance GHC.Generics.Generic Language.Haskell.Tools.Refactor.Querying.Severity instance GHC.Show.Show Language.Haskell.Tools.Refactor.Querying.Severity instance Data.Aeson.Types.ToJSON.ToJSON Language.Haskell.Tools.Refactor.Querying.QueryValue instance Data.Aeson.Types.ToJSON.ToJSON Language.Haskell.Tools.Refactor.Querying.Marker instance GHC.Show.Show Language.Haskell.Tools.Refactor.Querying.Marker instance Data.Aeson.Types.ToJSON.ToJSON Language.Haskell.Tools.Refactor.Querying.Severity instance Data.Aeson.Types.ToJSON.ToJSON SrcLoc.SrcSpan -- | Defines utility operations on Haskell names such as checking if a -- given identifier is a correct name for a certain kind of Haskell -- construct. module Language.Haskell.Tools.Refactor.Utils.Name -- | Different classes of definitions that have different kind of names. data NameClass -- | Normal value definitions: functions, variables Variable :: NameClass -- | Data constructors Ctor :: NameClass -- | Functions with operator-like names ValueOperator :: NameClass -- | Constructors with operator-like names DataCtorOperator :: NameClass -- | UType definitions with operator-like names SynonymOperator :: NameClass -- | Get which category does a given name belong to classifyName :: RefactorMonad m => Name -> m NameClass -- | Checks if a given name is a valid module name validModuleName :: String -> Maybe String -- | Check if a given name is valid for a given kind of definition nameValid :: NameClass -> String -> Maybe String isIdChar :: Char -> Bool isOperatorChar :: Char -> Bool module Language.Haskell.Tools.Refactor.Utils.NameLookup opSemName :: Operator -> Maybe Name declHeadQName :: DeclHead -> QualifiedName declHeadSemName :: DeclHead -> Maybe Name instHeadSemName :: InstanceHead -> Maybe Name -- | Collects the qualified names of the class heads in an assertion. assertionQNames :: Assertion -> [QualifiedName] -- | Collects the semantic names of the class heads in an assertion. assertionSemNames :: Assertion -> [Name] -- | Extracts the name of a type. In case of a type application, it finds -- the type being applied. It works only for unambiguous types, so it -- won't work for tuples. nameFromType :: Type -> Maybe Name instance Language.Haskell.Tools.AST.SemaInfoClasses.HasNameInfo' Name.Name instance Language.Haskell.Tools.AST.SemaInfoClasses.HasNameInfo' Language.Haskell.Tools.Rewrite.ElementTypes.Operator instance Language.Haskell.Tools.AST.SemaInfoClasses.HasNameInfo' Language.Haskell.Tools.Rewrite.ElementTypes.DeclHead instance Language.Haskell.Tools.AST.SemaInfoClasses.HasNameInfo' Language.Haskell.Tools.Rewrite.ElementTypes.InstanceHead module Language.Haskell.Tools.Refactor.Utils.Type typeExpr :: Expr -> Ghc Type appTypeMatches :: [ClsInst] -> Type -> [Type] -> Maybe (TCvSubst, Type) literalType :: Literal -> Ghc Type module Language.Haskell.Tools.Refactor.Utils.TypeLookup type ClosedTyFam = CoAxiom Branched hasConstraintKind :: Type -> Bool -- | Looks up the Type of an entity with an Id of any locality. If the -- entity being scrutinised is a type variable, it fails. lookupTypeFromId :: (HasIdInfo' id, GhcMonad m) => id -> MaybeT m Type -- | Looks up the Type or the Kind of an entity that has an Id. Note: In -- some cases we only get the Kind of the Id (e.g. for type constructors) typeOrKindFromId :: HasIdInfo' id => id -> Type -- | Extracts a Type from a TyThing when possible. typeFromTyThing :: TyThing -> Maybe Type -- | Looks up a GHC Type from a Haskell Tools Name (given the name is -- global) For an identifier, it returns its type. For a data -- constructor, it returns its type. For a pattern synonym, it returns -- its builder's type. For a type synonym constructor, it returns its -- right-hand side. For a coaxiom, it fails. lookupTypeFromGlobalName :: (HasNameInfo' n, GhcMonad m) => n -> MaybeT m Type -- | Looks up the right-hand side (GHC representation) of a Haskell Tools -- Name corresponding to a type synonym lookupTypeSynRhs :: (HasNameInfo' n, GhcMonad m) => n -> MaybeT m Type lookupSynDef :: TyThing -> Maybe TyCon tyconFromTyThing :: TyThing -> Maybe TyCon tyconFromGHCType :: Type -> Maybe TyCon isNewtype :: GhcMonad m => Type -> m Bool lookupType :: GhcMonad m => Type -> MaybeT m TyThing -- | Looks up a GHC.Class from something that has a type class constructor -- in it Fails if the argument does not contain a class type constructor lookupClassWith :: GhcMonad m => (a -> MaybeT m Name) -> a -> MaybeT m Class lookupClass :: (GhcMonad m, HasNameInfo' n) => n -> MaybeT m Class lookupClassFromInstance :: GhcMonad m => InstanceHead -> MaybeT m Class lookupClassFromDeclHead :: GhcMonad m => DeclHead -> MaybeT m Class -- | Looks up the right-hand side (GHC representation) of a Haskell Tools -- Type corresponding to a type synonym semanticsTypeSynRhs :: GhcMonad m => Type -> MaybeT m Type -- | Converts a global Haskell Tools type to a GHC type semanticsType :: GhcMonad m => Type -> MaybeT m Type isNewtypeTyCon :: TyThing -> Bool -- | Looks up the given name, extracts something out of it. If the -- extraction is not succesful, it returns False, if it is successful, -- then checks the result against the predicate. The reasoning behind -- this, is that the predicate can only be satisfied by a proper name. satisfies :: (HasNameInfo' n, GhcMonad m) => (TyThing -> Maybe a) -> (a -> Bool) -> n -> MaybeT m Bool -- | Decides whether a given name is a type family constructor. Fails if -- the lookup is not successful. isClassTyConNameM :: (HasNameInfo' n, GhcMonad m) => n -> MaybeT m Bool -- | Decides whether a given name is a standard Haskell98 data constructor. -- Fails if the lookup is not successful. isVanillaDataConNameM :: (HasNameInfo' n, GhcMonad m) => n -> MaybeT m Bool -- | Looks up a closed type family from a name. lookupClosedTyFam :: (HasNameInfo' n, GhcMonad m) => n -> MaybeT m ClosedTyFam -- | Extract the CoAxioms from a TyThing representing a closed type family. coAxiomFromTyThing :: TyThing -> Maybe (CoAxiom Branched) -- | Determines whether a Type itself has a type variable head. hasTyVarHead :: Type -> Bool instance GHC.Classes.Eq TyCoRep.Type -- | Defines the API for refactorings module Language.Haskell.Tools.Refactor -- | The trace function outputs the trace message given as its first -- argument, before returning the second argument as its result. -- -- For example, this returns the value of f x but first outputs -- the message. -- --
--   >>> let x = 123; f = show
--   
--   >>> trace ("calling f with x = " ++ show x) (f x)
--   "calling f with x = 123
--   123"
--   
-- -- The trace function should only be used for debugging, or -- for monitoring execution. The function is not referentially -- transparent: its type indicates that it is a pure function but it has -- the side effect of outputting the trace message. trace :: () => String -> a -> a -- | The Maybe type encapsulates an optional value. A value of type -- Maybe a either contains a value of type a -- (represented as Just a), or it is empty (represented -- as Nothing). Using Maybe is a good way to deal with -- errors or exceptional cases without resorting to drastic measures such -- as error. -- -- The Maybe type is also a monad. It is a simple kind of error -- monad, where all errors are represented by Nothing. A richer -- error monad can be built using the Either type. data Maybe a Nothing :: Maybe a Just :: a -> Maybe a -- | The maybe function takes a default value, a function, and a -- Maybe value. If the Maybe value is Nothing, the -- function returns the default value. Otherwise, it applies the function -- to the value inside the Just and returns the result. -- --

Examples

-- -- Basic usage: -- --
--   >>> maybe False odd (Just 3)
--   True
--   
-- --
--   >>> maybe False odd Nothing
--   False
--   
-- -- Read an integer from a string using readMaybe. If we succeed, -- return twice the integer; that is, apply (*2) to it. If -- instead we fail to parse an integer, return 0 by default: -- --
--   >>> import Text.Read ( readMaybe )
--   
--   >>> maybe 0 (*2) (readMaybe "5")
--   10
--   
--   >>> maybe 0 (*2) (readMaybe "")
--   0
--   
-- -- Apply show to a Maybe Int. If we have Just -- n, we want to show the underlying Int n. But if -- we have Nothing, we return the empty string instead of (for -- example) "Nothing": -- --
--   >>> maybe "" show (Just 5)
--   "5"
--   
--   >>> maybe "" show Nothing
--   ""
--   
maybe :: () => b -> a -> b -> Maybe a -> b -- | The isJust function returns True iff its argument is of -- the form Just _. -- --

Examples

-- -- Basic usage: -- --
--   >>> isJust (Just 3)
--   True
--   
-- --
--   >>> isJust (Just ())
--   True
--   
-- --
--   >>> isJust Nothing
--   False
--   
-- -- Only the outer constructor is taken into consideration: -- --
--   >>> isJust (Just Nothing)
--   True
--   
isJust :: () => Maybe a -> Bool -- | The isNothing function returns True iff its argument is -- Nothing. -- --

Examples

-- -- Basic usage: -- --
--   >>> isNothing (Just 3)
--   False
--   
-- --
--   >>> isNothing (Just ())
--   False
--   
-- --
--   >>> isNothing Nothing
--   True
--   
-- -- Only the outer constructor is taken into consideration: -- --
--   >>> isNothing (Just Nothing)
--   False
--   
isNothing :: () => Maybe a -> Bool -- | The fromMaybe function takes a default value and and -- Maybe value. If the Maybe is Nothing, it returns -- the default values; otherwise, it returns the value contained in the -- Maybe. -- --

Examples

-- -- Basic usage: -- --
--   >>> fromMaybe "" (Just "Hello, World!")
--   "Hello, World!"
--   
-- --
--   >>> fromMaybe "" Nothing
--   ""
--   
-- -- Read an integer from a string using readMaybe. If we fail to -- parse an integer, we want to return 0 by default: -- --
--   >>> import Text.Read ( readMaybe )
--   
--   >>> fromMaybe 0 (readMaybe "5")
--   5
--   
--   >>> fromMaybe 0 (readMaybe "")
--   0
--   
fromMaybe :: () => a -> Maybe a -> a -- | The maybeToList function returns an empty list when given -- Nothing or a singleton list when not given Nothing. -- --

Examples

-- -- Basic usage: -- --
--   >>> maybeToList (Just 7)
--   [7]
--   
-- --
--   >>> maybeToList Nothing
--   []
--   
-- -- One can use maybeToList to avoid pattern matching when combined -- with a function that (safely) works on lists: -- --
--   >>> import Text.Read ( readMaybe )
--   
--   >>> sum $ maybeToList (readMaybe "3")
--   3
--   
--   >>> sum $ maybeToList (readMaybe "")
--   0
--   
maybeToList :: () => Maybe a -> [a] -- | The listToMaybe function returns Nothing on an empty -- list or Just a where a is the first element -- of the list. -- --

Examples

-- -- Basic usage: -- --
--   >>> listToMaybe []
--   Nothing
--   
-- --
--   >>> listToMaybe [9]
--   Just 9
--   
-- --
--   >>> listToMaybe [1,2,3]
--   Just 1
--   
-- -- Composing maybeToList with listToMaybe should be the -- identity on singleton/empty lists: -- --
--   >>> maybeToList $ listToMaybe [5]
--   [5]
--   
--   >>> maybeToList $ listToMaybe []
--   []
--   
-- -- But not on lists with more than one element: -- --
--   >>> maybeToList $ listToMaybe [1,2,3]
--   [1]
--   
listToMaybe :: () => [a] -> Maybe a -- | The catMaybes function takes a list of Maybes and -- returns a list of all the Just values. -- --

Examples

-- -- Basic usage: -- --
--   >>> catMaybes [Just 1, Nothing, Just 3]
--   [1,3]
--   
-- -- When constructing a list of Maybe values, catMaybes can -- be used to return all of the "success" results (if the list is the -- result of a map, then mapMaybe would be more -- appropriate): -- --
--   >>> import Text.Read ( readMaybe )
--   
--   >>> [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
--   [Just 1,Nothing,Just 3]
--   
--   >>> catMaybes $ [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
--   [1,3]
--   
catMaybes :: () => [Maybe a] -> [a] -- | The mapMaybe function is a version of map which can -- throw out elements. In particular, the functional argument returns -- something of type Maybe b. If this is Nothing, -- no element is added on to the result list. If it is Just -- b, then b is included in the result list. -- --

Examples

-- -- Using mapMaybe f x is a shortcut for -- catMaybes $ map f x in most cases: -- --
--   >>> import Text.Read ( readMaybe )
--   
--   >>> let readMaybeInt = readMaybe :: String -> Maybe Int
--   
--   >>> mapMaybe readMaybeInt ["1", "Foo", "3"]
--   [1,3]
--   
--   >>> catMaybes $ map readMaybeInt ["1", "Foo", "3"]
--   [1,3]
--   
-- -- If we map the Just constructor, the entire list should be -- returned: -- --
--   >>> mapMaybe Just [1,2,3]
--   [1,2,3]
--   
mapMaybe :: () => a -> Maybe b -> [a] -> [b] -- | The traceMarkerIO function emits a marker to the eventlog, if -- eventlog profiling is available and enabled at runtime. -- -- Compared to traceMarker, traceMarkerIO sequences the -- event with respect to other IO actions. traceMarkerIO :: String -> IO () -- | The traceMarker function emits a marker to the eventlog, if -- eventlog profiling is available and enabled at runtime. The -- String is the name of the marker. The name is just used in -- the profiling tools to help you keep clear which marker is which. -- -- This function is suitable for use in pure code. In an IO context use -- traceMarkerIO instead. -- -- Note that when using GHC's SMP runtime, it is possible (but rare) to -- get duplicate events emitted if two CPUs simultaneously evaluate the -- same thunk that uses traceMarker. traceMarker :: () => String -> a -> a -- | The traceEventIO function emits a message to the eventlog, if -- eventlog profiling is available and enabled at runtime. -- -- Compared to traceEvent, traceEventIO sequences the event -- with respect to other IO actions. traceEventIO :: String -> IO () -- | The traceEvent function behaves like trace with the -- difference that the message is emitted to the eventlog, if eventlog -- profiling is available and enabled at runtime. -- -- It is suitable for use in pure code. In an IO context use -- traceEventIO instead. -- -- Note that when using GHC's SMP runtime, it is possible (but rare) to -- get duplicate events emitted if two CPUs simultaneously evaluate the -- same thunk that uses traceEvent. traceEvent :: () => String -> a -> a -- | like trace, but additionally prints a call stack if one is -- available. -- -- In the current GHC implementation, the call stack is only available if -- the program was compiled with -prof; otherwise -- traceStack behaves exactly like trace. Entries in the -- call stack correspond to SCC annotations, so it is a good -- idea to use -fprof-auto or -fprof-auto-calls to add -- SCC annotations automatically. traceStack :: () => String -> a -> a -- | Like traceM, but uses show on the argument to convert it -- to a String. -- --
--   >>> :{
--   do
--       x <- Just 3
--       traceShowM x
--       y <- pure 12
--       traceShowM y
--       pure (x*2 + y)
--   :}
--   3
--   12
--   Just 18
--   
traceShowM :: (Show a, Applicative f) => a -> f () -- | Like trace but returning unit in an arbitrary -- Applicative context. Allows for convenient use in do-notation. -- -- Note that the application of traceM is not an action in the -- Applicative context, as traceIO is in the IO -- type. While the fresh bindings in the following example will force the -- traceM expressions to be reduced every time the -- do-block is executed, traceM "not crashed" would -- only be reduced once, and the message would only be printed once. If -- your monad is in MonadIO, liftIO . traceIO may be a -- better option. -- --
--   >>> :{
--   do
--       x <- Just 3
--       traceM ("x: " ++ show x)
--       y <- pure 12
--       traceM ("y: " ++ show y)
--       pure (x*2 + y)
--   :}
--   x: 3
--   y: 12
--   Just 18
--   
traceM :: Applicative f => String -> f () -- | Like traceShow but returns the shown value instead of a third -- value. -- --
--   >>> traceShowId (1+2+3, "hello" ++ "world")
--   (6,"helloworld")
--   (6,"helloworld")
--   
traceShowId :: Show a => a -> a -- | Like trace, but uses show on the argument to convert it -- to a String. -- -- This makes it convenient for printing the values of interesting -- variables or expressions inside a function. For example here we print -- the value of the variables x and y: -- --
--   >>> let f x y = traceShow (x,y) (x + y) in f (1+2) 5
--   (3,5)
--   8
--   
traceShow :: Show a => a -> b -> b -- | Like trace but returns the message instead of a third value. -- --
--   >>> traceId "hello"
--   "hello
--   hello"
--   
traceId :: String -> String putTraceMsg :: String -> IO () -- | The traceIO function outputs the trace message from the IO -- monad. This sequences the output with respect to other IO actions. traceIO :: String -> IO () -- | The fromJust function extracts the element out of a Just -- and throws an error if its argument is Nothing. -- --

Examples

-- -- Basic usage: -- --
--   >>> fromJust (Just 1)
--   1
--   
-- --
--   >>> 2 * (fromJust (Just 10))
--   20
--   
-- --
--   >>> 2 * (fromJust Nothing)
--   *** Exception: Maybe.fromJust: Nothing
--   
fromJust :: () => Maybe a -> a -- | The parameterizable maybe monad, obtained by composing an arbitrary -- monad with the Maybe monad. -- -- Computations are actions that may produce a value or exit. -- -- The return function yields a computation that produces that -- value, while >>= sequences two subcomputations, exiting -- if either computation does. newtype MaybeT (m :: * -> *) a MaybeT :: m Maybe a -> MaybeT a [runMaybeT] :: MaybeT a -> m Maybe a inScope :: Name -> Scope -> Bool -- | Compares two source spans based on their lengths. Can only used for -- NESTED spans. compareRangeLength :: SrcSpan -> SrcSpan -> Ordering -- | Get the shortest source range that contains the given getNodeContaining :: (Biplate Ann node dom stage Ann inner dom stage, SourceInfo stage, HasRange Ann inner dom stage) => RealSrcSpan -> Ann node dom stage -> Maybe Ann inner dom stage -- | Get the nodes that have exactly the given range nodesWithRange :: (Biplate Ann node dom stage Ann inner dom stage, SourceInfo stage) => RealSrcSpan -> Simple Traversal Ann node dom stage Ann inner dom stage -- | Return true if the node contains a given range isContained :: HasRange inner dom stage => RealSrcSpan -> inner dom stage -> Bool -- | Get all nodes that are contained in a given source range nodesContained :: (HasRange inner dom stage, Biplate node dom stage inner dom stage) => RealSrcSpan -> Simple Traversal node dom stage inner dom stage -- | Return true if the node contains a given range isInside :: HasRange inner dom stage => RealSrcSpan -> inner dom stage -> Bool -- | Get all nodes that contain a given source range nodesContaining :: (HasRange inner dom stage, Biplate node dom stage inner dom stage) => RealSrcSpan -> Simple Traversal node dom stage inner dom stage -- | Access the semantic information of an AST node. semantics :: RefMonads w r => Reference w r MU MU Ann elem dom stage Ann elem dom stage SemanticInfo dom elem SemanticInfo dom elem valBindPats :: (RefMonads w r, MonadPlus r, Morph Maybe r, Morph [] r) => Reference w r MU MU Ann UValueBind dom stage Ann UValueBind dom stage Ann UPattern dom stage Ann UPattern dom stage -- | A reference to access type arguments to a type constructor call that -- may be universally qualified or parenthesized. typeParams :: (RefMonads w r, MonadPlus r, Morph Maybe r, Morph [] r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UType dom stage Ann UType dom stage -- | Accesses that name of a declaration through the declaration head. declHeadNames :: (RefMonads w r, MonadPlus r, Morph Maybe r, Morph [] r) => Reference w r MU MU Ann UDeclHead dom stage Ann UDeclHead dom stage Ann UQualifiedName dom stage Ann UQualifiedName dom stage -- | Accesses the name of a function or value binding bindingName :: (RefMonads w r, MonadPlus r, Morph Maybe r, Morph [] r) => Reference w r MU MU Ann UValueBind dom stage Ann UValueBind dom stage Ann UQualifiedName dom stage Ann UQualifiedName dom stage -- | Does the import declaration import all elements that are not excluded -- explicitly? importIsHiding :: () => Ann UImportDecl dom stage -> Bool -- | Does the import declaration import only the explicitly listed -- elements? importIsExact :: () => Ann UImportDecl dom stage -> Bool -- | A class to access the names of named elements. Have to locate where -- does the AST element store its name. The returned name will be the one -- that was marked isDefining. class NamedElement (elem :: * -> * -> *) elementName :: (NamedElement elem, RefMonads w r, MonadPlus r, Morph Maybe r, Morph [] r) => Reference w r MU MU Ann elem dom st Ann elem dom st Ann UQualifiedName dom st Ann UQualifiedName dom st stringNodeStr :: RefMonads w r => Reference w r MU MU Ann UStringNode dom stage Ann UStringNode dom stage String String simpleNameStr :: RefMonads w r => Reference w r MU MU Ann UNamePart dom stage Ann UNamePart dom stage String String unqualifiedName :: RefMonads w r => Reference w r MU MU Ann UQualifiedName dom stage Ann UQualifiedName dom stage Ann UNamePart dom stage Ann UNamePart dom stage qualifiers :: RefMonads w r => Reference w r MU MU Ann UQualifiedName dom stage Ann UQualifiedName dom stage AnnListG UNamePart dom stage AnnListG UNamePart dom stage simpleName :: RefMonads w r => Reference w r MU MU Ann UName dom stage Ann UName dom stage Ann UQualifiedName dom stage Ann UQualifiedName dom stage operatorName :: RefMonads w r => Reference w r MU MU Ann UOperator dom stage Ann UOperator dom stage Ann UQualifiedName dom stage Ann UQualifiedName dom stage promotedStringValue :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPromoted t dom stage Ann UPromoted t dom stage String String promotedIntValue :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPromoted t dom stage Ann UPromoted t dom stage Integer Integer promotedElements :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPromoted t dom stage Ann UPromoted t dom stage AnnListG t dom stage AnnListG t dom stage promotedConName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPromoted t dom stage Ann UPromoted t dom stage Ann UName dom stage Ann UName dom stage stringLitValue :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann ULiteral dom stage Ann ULiteral dom stage String String intLitValue :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann ULiteral dom stage Ann ULiteral dom stage Integer Integer fracLitValue :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann ULiteral dom stage Ann ULiteral dom stage Rational Rational floatLitValue :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann ULiteral dom stage Ann ULiteral dom stage Rational Rational charLitValue :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann ULiteral dom stage Ann ULiteral dom stage Char Char bracketType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UBracket dom stage Ann UBracket dom stage Ann UType dom stage Ann UType dom stage bracketPattern :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UBracket dom stage Ann UBracket dom stage Ann UPattern dom stage Ann UPattern dom stage bracketExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UBracket dom stage Ann UBracket dom stage Ann UExpr dom stage Ann UExpr dom stage bracketDecl :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UBracket dom stage Ann UBracket dom stage AnnListG UDecl dom stage AnnListG UDecl dom stage qqString :: RefMonads w r => Reference w r MU MU Ann QQString dom stage Ann QQString dom stage String String qqExprName :: RefMonads w r => Reference w r MU MU Ann UQuasiQuote dom stage Ann UQuasiQuote dom stage Ann UName dom stage Ann UName dom stage qqExprBody :: RefMonads w r => Reference w r MU MU Ann UQuasiQuote dom stage Ann UQuasiQuote dom stage Ann QQString dom stage Ann QQString dom stage spliceId :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann USplice dom stage Ann USplice dom stage Ann UName dom stage Ann UName dom stage spliceExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann USplice dom stage Ann USplice dom stage Ann UExpr dom stage Ann UExpr dom stage fieldPatternWildcard :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPatternField dom stage Ann UPatternField dom stage Ann UFieldWildcard dom stage Ann UFieldWildcard dom stage fieldPatternName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPatternField dom stage Ann UPatternField dom stage Ann UName dom stage Ann UName dom stage fieldPattern :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPatternField dom stage Ann UPatternField dom stage Ann UPattern dom stage Ann UPattern dom stage patternType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage Ann UType dom stage Ann UType dom stage patternSumPlaceholdersBefore :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage AnnListG UUnboxedSumPlaceHolder dom stage AnnListG UUnboxedSumPlaceHolder dom stage patternSumPlaceholdersAfter :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage AnnListG UUnboxedSumPlaceHolder dom stage AnnListG UUnboxedSumPlaceHolder dom stage patternSplice :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage Ann USplice dom stage Ann USplice dom stage patternRhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage Ann UPattern dom stage Ann UPattern dom stage patternOperator :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage Ann UOperator dom stage Ann UOperator dom stage patternName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage Ann UName dom stage Ann UName dom stage patternLiteral :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage Ann ULiteral dom stage Ann ULiteral dom stage patternLit :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage Ann ULiteral dom stage Ann ULiteral dom stage patternLhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage Ann UPattern dom stage Ann UPattern dom stage patternInner :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage Ann UPattern dom stage Ann UPattern dom stage patternFields :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage AnnListG UPatternField dom stage AnnListG UPatternField dom stage patternExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage Ann UExpr dom stage Ann UExpr dom stage patternElems :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage AnnListG UPattern dom stage AnnListG UPattern dom stage patternArgs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage AnnListG UPattern dom stage AnnListG UPattern dom stage patQQ :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPattern dom stage Ann UPattern dom stage Ann UQuasiQuote dom stage Ann UQuasiQuote dom stage cmdThen :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage Ann UCmd dom stage Ann UCmd dom stage cmdStmts :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage AnnListG UCmdStmt dom stage AnnListG UCmdStmt dom stage cmdRightCmd :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage Ann UCmd dom stage Ann UCmd dom stage cmdRhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage Ann UExpr dom stage Ann UExpr dom stage cmdOperator :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage Ann UName dom stage Ann UName dom stage cmdLhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage Ann UExpr dom stage Ann UExpr dom stage cmdLeftCmd :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage Ann UCmd dom stage Ann UCmd dom stage cmdInnerCmds :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage AnnListG UCmd dom stage AnnListG UCmd dom stage cmdInnerCmd :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage Ann UCmd dom stage Ann UCmd dom stage cmdInner :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage Ann UCmd dom stage Ann UCmd dom stage cmdExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage Ann UExpr dom stage Ann UExpr dom stage cmdElse :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage Ann UCmd dom stage Ann UCmd dom stage cmdBinds :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage AnnListG ULocalBind dom stage AnnListG ULocalBind dom stage cmdBindings :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage AnnListG UPattern dom stage AnnListG UPattern dom stage cmdArrowOp :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage Ann UArrowAppl dom stage Ann UArrowAppl dom stage cmdApplied :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage Ann UExpr dom stage Ann UExpr dom stage cmdAlts :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCmd dom stage Ann UCmd dom stage AnnListG UCmdAlt dom stage AnnListG UCmdAlt dom stage compStmts :: RefMonads w r => Reference w r MU MU Ann UListCompBody dom stage Ann UListCompBody dom stage AnnListG UCompStmt dom stage AnnListG UCompStmt dom stage usingExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCompStmt dom stage Ann UCompStmt dom stage AnnMaybeG UExpr dom stage AnnMaybeG UExpr dom stage thenExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCompStmt dom stage Ann UCompStmt dom stage Ann UExpr dom stage Ann UExpr dom stage compStmt :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCompStmt dom stage Ann UCompStmt dom stage Ann UStmt dom stage Ann UStmt dom stage byExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCompStmt dom stage Ann UCompStmt dom stage AnnMaybeG UExpr dom stage AnnMaybeG UExpr dom stage stmtPattern :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UStmt' expr dom stage Ann UStmt' expr dom stage Ann UPattern dom stage Ann UPattern dom stage stmtExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UStmt' expr dom stage Ann UStmt' expr dom stage Ann expr dom stage Ann expr dom stage stmtBinds :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UStmt' expr dom stage Ann UStmt' expr dom stage AnnListG ULocalBind dom stage AnnListG ULocalBind dom stage cmdStmtBinds :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UStmt' expr dom stage Ann UStmt' expr dom stage AnnListG UStmt' expr dom stage AnnListG UStmt' expr dom stage caseGuardStmts :: RefMonads w r => Reference w r MU MU Ann UGuardedCaseRhs' expr dom stage Ann UGuardedCaseRhs' expr dom stage AnnListG URhsGuard dom stage AnnListG URhsGuard dom stage caseGuardExpr :: RefMonads w r => Reference w r MU MU Ann UGuardedCaseRhs' expr dom stage Ann UGuardedCaseRhs' expr dom stage Ann expr dom stage Ann expr dom stage rhsCaseGuards :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCaseRhs' expr dom stage Ann UCaseRhs' expr dom stage AnnListG UGuardedCaseRhs' expr dom stage AnnListG UGuardedCaseRhs' expr dom stage rhsCaseExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UCaseRhs' expr dom stage Ann UCaseRhs' expr dom stage Ann expr dom stage Ann expr dom stage pragmaStr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExprPragma dom stage Ann UExprPragma dom stage Ann UStringNode dom stage Ann UStringNode dom stage pragmaSrcRange :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExprPragma dom stage Ann UExprPragma dom stage Ann USourceRange dom stage Ann USourceRange dom stage tupSecExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTupSecElem dom stage Ann UTupSecElem dom stage Ann UExpr dom stage Ann UExpr dom stage fieldWildcard :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UFieldUpdate dom stage Ann UFieldUpdate dom stage Ann UFieldWildcard dom stage Ann UFieldWildcard dom stage fieldValue :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UFieldUpdate dom stage Ann UFieldUpdate dom stage Ann UExpr dom stage Ann UExpr dom stage fieldUpdateName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UFieldUpdate dom stage Ann UFieldUpdate dom stage Ann UName dom stage Ann UName dom stage fieldName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UFieldUpdate dom stage Ann UFieldUpdate dom stage Ann UName dom stage Ann UName dom stage altRhs :: RefMonads w r => Reference w r MU MU Ann UAlt' expr dom stage Ann UAlt' expr dom stage Ann UCaseRhs' expr dom stage Ann UCaseRhs' expr dom stage altPattern :: RefMonads w r => Reference w r MU MU Ann UAlt' expr dom stage Ann UAlt' expr dom stage Ann UPattern dom stage Ann UPattern dom stage altBinds :: RefMonads w r => Reference w r MU MU Ann UAlt' expr dom stage Ann UAlt' expr dom stage AnnMaybeG ULocalBinds dom stage AnnMaybeG ULocalBinds dom stage tupleSectionElems :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnListG UTupSecElem dom stage AnnListG UTupSecElem dom stage tupleElems :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnListG UExpr dom stage AnnListG UExpr dom stage quotedName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UName dom stage Ann UName dom stage procPattern :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UPattern dom stage Ann UPattern dom stage procExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UCmd dom stage Ann UCmd dom stage listElems :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnListG UExpr dom stage AnnListG UExpr dom stage innerExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage exprType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UType dom stage Ann UType dom stage exprThen :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage exprSumPlaceholdersBefore :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnListG UUnboxedSumPlaceHolder dom stage AnnListG UUnboxedSumPlaceHolder dom stage exprSumPlaceholdersAfter :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnListG UUnboxedSumPlaceHolder dom stage AnnListG UUnboxedSumPlaceHolder dom stage exprStmts :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnListG UStmt dom stage AnnListG UStmt dom stage exprSplice :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann USplice dom stage Ann USplice dom stage exprSig :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UType dom stage Ann UType dom stage exprRhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage exprRecName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UName dom stage Ann UName dom stage exprRecFields :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnListG UFieldUpdate dom stage AnnListG UFieldUpdate dom stage exprQQ :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UQuasiQuote dom stage Ann UQuasiQuote dom stage exprPragma :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExprPragma dom stage Ann UExprPragma dom stage exprOperator :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UOperator dom stage Ann UOperator dom stage exprName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UName dom stage Ann UName dom stage exprLit :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann ULiteral dom stage Ann ULiteral dom stage exprLhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage exprInner :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage exprIfAlts :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnListG UGuardedCaseRhs dom stage AnnListG UGuardedCaseRhs dom stage exprFunBind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnListG ULocalBind dom stage AnnListG ULocalBind dom stage exprFun :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage exprElse :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage exprCond :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage exprCase :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage exprBracket :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UBracket dom stage Ann UBracket dom stage exprBindings :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnListG UPattern dom stage AnnListG UPattern dom stage exprArg :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage exprAlts :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnListG UAlt dom stage AnnListG UAlt dom stage enumToFix :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage enumTo :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnMaybeG UExpr dom stage AnnMaybeG UExpr dom stage enumThen :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnMaybeG UExpr dom stage AnnMaybeG UExpr dom stage enumFrom :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage doKind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UDoKind dom stage Ann UDoKind dom stage compExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage Ann UExpr dom stage compBody :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage AnnListG UListCompBody dom stage AnnListG UListCompBody dom stage arrowAppl :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExpr dom stage Ann UExpr dom stage Ann UArrowAppl dom stage Ann UArrowAppl dom stage innerAsserts :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UAssertion dom stage Ann UAssertion dom stage AnnListG UAssertion dom stage AnnListG UAssertion dom stage assertTypes :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UAssertion dom stage Ann UAssertion dom stage AnnListG UType dom stage AnnListG UType dom stage assertRhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UAssertion dom stage Ann UAssertion dom stage Ann UType dom stage Ann UType dom stage assertOp :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UAssertion dom stage Ann UAssertion dom stage Ann UOperator dom stage Ann UOperator dom stage assertLhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UAssertion dom stage Ann UAssertion dom stage Ann UType dom stage Ann UType dom stage assertImplVar :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UAssertion dom stage Ann UAssertion dom stage Ann UName dom stage Ann UName dom stage assertImplType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UAssertion dom stage Ann UAssertion dom stage Ann UType dom stage Ann UType dom stage assertClsName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UAssertion dom stage Ann UAssertion dom stage Ann UName dom stage Ann UName dom stage contextAssertion :: RefMonads w r => Reference w r MU MU Ann UContext dom stage Ann UContext dom stage Ann UAssertion dom stage Ann UAssertion dom stage kindVar :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage Ann UName dom stage Ann UName dom stage kindType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage Ann UType dom stage Ann UType dom stage kindRight :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage kindRhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage kindPromoted :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage Ann UPromoted UKind dom stage Ann UPromoted UKind dom stage kindParen :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage kindLhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage kindLeft :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage kindElems :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage AnnListG UKind dom stage AnnListG UKind dom stage kindElem :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage kindAppOp :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage Ann UOperator dom stage Ann UOperator dom stage kindAppFun :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage kindAppArg :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage Ann UKind dom stage typeWildcardName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UName dom stage Ann UName dom stage typeType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UType dom stage Ann UType dom stage typeRight :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UType dom stage Ann UType dom stage typeResult :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UType dom stage Ann UType dom stage typeQQ :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UQuasiQuote dom stage Ann UQuasiQuote dom stage typeParam :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UType dom stage Ann UType dom stage typeOperator :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UOperator dom stage Ann UOperator dom stage typeName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UName dom stage Ann UName dom stage typeLeft :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UType dom stage Ann UType dom stage typeKind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UKind dom stage Ann UKind dom stage typeInner :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UType dom stage Ann UType dom stage typeElements :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage AnnListG UType dom stage AnnListG UType dom stage typeElement :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UType dom stage Ann UType dom stage typeCtx :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UContext dom stage Ann UContext dom stage typeCon :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UType dom stage Ann UType dom stage typeBounded :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage AnnListG UTyVar dom stage AnnListG UTyVar dom stage typeArg :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UType dom stage Ann UType dom stage tsSplice :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann USplice dom stage Ann USplice dom stage tpPromoted :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UType dom stage Ann UType dom stage Ann UPromoted UType dom stage Ann UPromoted UType dom stage tyVarName :: RefMonads w r => Reference w r MU MU Ann UTyVar dom stage Ann UTyVar dom stage Ann UName dom stage Ann UName dom stage tyVarKind :: RefMonads w r => Reference w r MU MU Ann UTyVar dom stage Ann UTyVar dom stage AnnMaybeG UKindConstraint dom stage AnnMaybeG UKindConstraint dom stage valBindRhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UValueBind dom stage Ann UValueBind dom stage Ann URhs dom stage Ann URhs dom stage valBindPat :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UValueBind dom stage Ann UValueBind dom stage Ann UPattern dom stage Ann UPattern dom stage valBindLocals :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UValueBind dom stage Ann UValueBind dom stage AnnMaybeG ULocalBinds dom stage AnnMaybeG ULocalBinds dom stage funBindMatches :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UValueBind dom stage Ann UValueBind dom stage AnnListG UMatch dom stage AnnListG UMatch dom stage kindConstr :: RefMonads w r => Reference w r MU MU Ann UKindConstraint dom stage Ann UKindConstraint dom stage Ann UKind dom stage Ann UKind dom stage matchLhsRhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UMatchLhs dom stage Ann UMatchLhs dom stage Ann UPattern dom stage Ann UPattern dom stage matchLhsOperator :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UMatchLhs dom stage Ann UMatchLhs dom stage Ann UOperator dom stage Ann UOperator dom stage matchLhsName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UMatchLhs dom stage Ann UMatchLhs dom stage Ann UName dom stage Ann UName dom stage matchLhsLhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UMatchLhs dom stage Ann UMatchLhs dom stage Ann UPattern dom stage Ann UPattern dom stage matchLhsArgs :: RefMonads w r => Reference w r MU MU Ann UMatchLhs dom stage Ann UMatchLhs dom stage AnnListG UPattern dom stage AnnListG UPattern dom stage tsType :: RefMonads w r => Reference w r MU MU Ann UTypeSignature dom stage Ann UTypeSignature dom stage Ann UType dom stage Ann UType dom stage tsName :: RefMonads w r => Reference w r MU MU Ann UTypeSignature dom stage Ann UTypeSignature dom stage AnnListG UName dom stage AnnListG UName dom stage precedenceValue :: RefMonads w r => Reference w r MU MU Ann Precedence dom stage Ann Precedence dom stage Int Int fixityPrecedence :: RefMonads w r => Reference w r MU MU Ann UFixitySignature dom stage Ann UFixitySignature dom stage AnnMaybeG Precedence dom stage AnnMaybeG Precedence dom stage fixityOperators :: RefMonads w r => Reference w r MU MU Ann UFixitySignature dom stage Ann UFixitySignature dom stage AnnListG UOperator dom stage AnnListG UOperator dom stage fixityAssoc :: RefMonads w r => Reference w r MU MU Ann UFixitySignature dom stage Ann UFixitySignature dom stage Ann Assoc dom stage Ann Assoc dom stage localBinds :: RefMonads w r => Reference w r MU MU Ann ULocalBinds dom stage Ann ULocalBinds dom stage AnnListG ULocalBind dom stage AnnListG ULocalBind dom stage localVal :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann ULocalBind dom stage Ann ULocalBind dom stage Ann UValueBind dom stage Ann UValueBind dom stage localSig :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann ULocalBind dom stage Ann ULocalBind dom stage Ann UTypeSignature dom stage Ann UTypeSignature dom stage localInline :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann ULocalBind dom stage Ann ULocalBind dom stage Ann UInlinePragma dom stage Ann UInlinePragma dom stage localFixity :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann ULocalBind dom stage Ann ULocalBind dom stage Ann UFixitySignature dom stage Ann UFixitySignature dom stage guardRhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann URhsGuard dom stage Ann URhsGuard dom stage Ann UExpr dom stage Ann UExpr dom stage guardPat :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann URhsGuard dom stage Ann URhsGuard dom stage Ann UPattern dom stage Ann UPattern dom stage guardCheck :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann URhsGuard dom stage Ann URhsGuard dom stage Ann UExpr dom stage Ann UExpr dom stage guardBinds :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann URhsGuard dom stage Ann URhsGuard dom stage AnnListG ULocalBind dom stage AnnListG ULocalBind dom stage guardStmts :: RefMonads w r => Reference w r MU MU Ann UGuardedRhs dom stage Ann UGuardedRhs dom stage AnnListG URhsGuard dom stage AnnListG URhsGuard dom stage guardExpr :: RefMonads w r => Reference w r MU MU Ann UGuardedRhs dom stage Ann UGuardedRhs dom stage Ann UExpr dom stage Ann UExpr dom stage rhsGuards :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann URhs dom stage Ann URhs dom stage AnnListG UGuardedRhs dom stage AnnListG UGuardedRhs dom stage rhsExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann URhs dom stage Ann URhs dom stage Ann UExpr dom stage Ann UExpr dom stage matchRhs :: RefMonads w r => Reference w r MU MU Ann UMatch dom stage Ann UMatch dom stage Ann URhs dom stage Ann URhs dom stage matchLhs :: RefMonads w r => Reference w r MU MU Ann UMatch dom stage Ann UMatch dom stage Ann UMatchLhs dom stage Ann UMatchLhs dom stage matchBinds :: RefMonads w r => Reference w r MU MU Ann UMatch dom stage Ann UMatch dom stage AnnMaybeG ULocalBinds dom stage AnnMaybeG ULocalBinds dom stage specializeType :: RefMonads w r => Reference w r MU MU Ann USpecializePragma dom stage Ann USpecializePragma dom stage AnnListG UType dom stage AnnListG UType dom stage specializeDef :: RefMonads w r => Reference w r MU MU Ann USpecializePragma dom stage Ann USpecializePragma dom stage Ann UName dom stage Ann UName dom stage pragmaPhase :: RefMonads w r => Reference w r MU MU Ann USpecializePragma dom stage Ann USpecializePragma dom stage AnnMaybeG UPhaseControl dom stage AnnMaybeG UPhaseControl dom stage numberInteger :: RefMonads w r => Reference w r MU MU Ann Number dom stage Ann Number dom stage Integer Integer srToLine :: RefMonads w r => Reference w r MU MU Ann USourceRange dom stage Ann USourceRange dom stage Ann Number dom stage Ann Number dom stage srToCol :: RefMonads w r => Reference w r MU MU Ann USourceRange dom stage Ann USourceRange dom stage Ann Number dom stage Ann Number dom stage srFromLine :: RefMonads w r => Reference w r MU MU Ann USourceRange dom stage Ann USourceRange dom stage Ann Number dom stage Ann Number dom stage srFromCol :: RefMonads w r => Reference w r MU MU Ann USourceRange dom stage Ann USourceRange dom stage Ann Number dom stage Ann Number dom stage srFileName :: RefMonads w r => Reference w r MU MU Ann USourceRange dom stage Ann USourceRange dom stage Ann UStringNode dom stage Ann UStringNode dom stage minimalOrs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UMinimalFormula dom stage Ann UMinimalFormula dom stage AnnListG UMinimalFormula dom stage AnnListG UMinimalFormula dom stage minimalName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UMinimalFormula dom stage Ann UMinimalFormula dom stage Ann UName dom stage Ann UName dom stage minimalInner :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UMinimalFormula dom stage Ann UMinimalFormula dom stage Ann UMinimalFormula dom stage Ann UMinimalFormula dom stage minimalAnds :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UMinimalFormula dom stage Ann UMinimalFormula dom stage AnnListG UMinimalFormula dom stage AnnListG UMinimalFormula dom stage annotateName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UAnnotationSubject dom stage Ann UAnnotationSubject dom stage Ann UName dom stage Ann UName dom stage warnMessage :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTopLevelPragma dom stage Ann UTopLevelPragma dom stage AnnListG UStringNode dom stage AnnListG UStringNode dom stage specializePragma :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTopLevelPragma dom stage Ann UTopLevelPragma dom stage Ann USpecializePragma dom stage Ann USpecializePragma dom stage pragmaSignature :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTopLevelPragma dom stage Ann UTopLevelPragma dom stage AnnMaybeG UName dom stage AnnMaybeG UName dom stage pragmaRule :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTopLevelPragma dom stage Ann UTopLevelPragma dom stage AnnListG URule dom stage AnnListG URule dom stage pragmaObjects :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTopLevelPragma dom stage Ann UTopLevelPragma dom stage AnnListG UName dom stage AnnListG UName dom stage pragmaLineNum :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTopLevelPragma dom stage Ann UTopLevelPragma dom stage Ann LineNumber dom stage Ann LineNumber dom stage pragmaInline :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTopLevelPragma dom stage Ann UTopLevelPragma dom stage Ann UInlinePragma dom stage Ann UInlinePragma dom stage pragmaFileName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTopLevelPragma dom stage Ann UTopLevelPragma dom stage AnnMaybeG UStringNode dom stage AnnMaybeG UStringNode dom stage deprMessage :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTopLevelPragma dom stage Ann UTopLevelPragma dom stage AnnListG UStringNode dom stage AnnListG UStringNode dom stage annotationSubject :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTopLevelPragma dom stage Ann UTopLevelPragma dom stage Ann UAnnotationSubject dom stage Ann UAnnotationSubject dom stage annotateExpr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTopLevelPragma dom stage Ann UTopLevelPragma dom stage Ann UExpr dom stage Ann UExpr dom stage phaseNum :: RefMonads w r => Reference w r MU MU Ann PhaseNumber dom stage Ann PhaseNumber dom stage Integer Integer phaseUntil :: RefMonads w r => Reference w r MU MU Ann UPhaseControl dom stage Ann UPhaseControl dom stage AnnMaybeG PhaseInvert dom stage AnnMaybeG PhaseInvert dom stage phaseNumber :: RefMonads w r => Reference w r MU MU Ann UPhaseControl dom stage Ann UPhaseControl dom stage AnnMaybeG PhaseNumber dom stage AnnMaybeG PhaseNumber dom stage ruleVarType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann URuleVar dom stage Ann URuleVar dom stage Ann UType dom stage Ann UType dom stage ruleVarName :: RefMonads w r => Reference w r MU MU Ann URuleVar dom stage Ann URuleVar dom stage Ann UName dom stage Ann UName dom stage ruleRhs :: RefMonads w r => Reference w r MU MU Ann URule dom stage Ann URule dom stage Ann UExpr dom stage Ann UExpr dom stage rulePhase :: RefMonads w r => Reference w r MU MU Ann URule dom stage Ann URule dom stage AnnMaybeG UPhaseControl dom stage AnnMaybeG UPhaseControl dom stage ruleName :: RefMonads w r => Reference w r MU MU Ann URule dom stage Ann URule dom stage Ann UStringNode dom stage Ann UStringNode dom stage ruleLhs :: RefMonads w r => Reference w r MU MU Ann URule dom stage Ann URule dom stage Ann UExpr dom stage Ann UExpr dom stage ruleBounded :: RefMonads w r => Reference w r MU MU Ann URule dom stage Ann URule dom stage AnnListG URuleVar dom stage AnnListG URuleVar dom stage teRhs :: RefMonads w r => Reference w r MU MU Ann UTypeEqn dom stage Ann UTypeEqn dom stage Ann UType dom stage Ann UType dom stage teLhs :: RefMonads w r => Reference w r MU MU Ann UTypeEqn dom stage Ann UTypeEqn dom stage Ann UType dom stage Ann UType dom stage ihType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstanceHead dom stage Ann UInstanceHead dom stage Ann UType dom stage Ann UType dom stage ihOperator :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstanceHead dom stage Ann UInstanceHead dom stage Ann UOperator dom stage Ann UOperator dom stage ihLeftOp :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstanceHead dom stage Ann UInstanceHead dom stage Ann UType dom stage Ann UType dom stage ihHead :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstanceHead dom stage Ann UInstanceHead dom stage Ann UInstanceHead dom stage Ann UInstanceHead dom stage ihFun :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstanceHead dom stage Ann UInstanceHead dom stage Ann UInstanceHead dom stage Ann UInstanceHead dom stage ihConName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstanceHead dom stage Ann UInstanceHead dom stage Ann UName dom stage Ann UName dom stage irVars :: RefMonads w r => Reference w r MU MU Ann UInstanceRule dom stage Ann UInstanceRule dom stage AnnMaybeG AnnListG UTyVar dom stage AnnMaybeG AnnListG UTyVar dom stage irHead :: RefMonads w r => Reference w r MU MU Ann UInstanceRule dom stage Ann UInstanceRule dom stage Ann UInstanceHead dom stage Ann UInstanceHead dom stage irCtx :: RefMonads w r => Reference w r MU MU Ann UInstanceRule dom stage Ann UInstanceRule dom stage AnnMaybeG UContext dom stage AnnMaybeG UContext dom stage oneDerived :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDeriving dom stage Ann UDeriving dom stage Ann UInstanceHead dom stage Ann UInstanceHead dom stage allDerived :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDeriving dom stage Ann UDeriving dom stage AnnListG UInstanceHead dom stage AnnListG UInstanceHead dom stage deriveStrategy :: RefMonads w r => Reference w r MU MU Ann UDeriving dom stage Ann UDeriving dom stage AnnMaybeG UDeriveStrategy dom stage AnnMaybeG UDeriveStrategy dom stage fieldType :: RefMonads w r => Reference w r MU MU Ann UFieldDecl dom stage Ann UFieldDecl dom stage Ann UType dom stage Ann UType dom stage fieldNames :: RefMonads w r => Reference w r MU MU Ann UFieldDecl dom stage Ann UFieldDecl dom stage AnnListG UName dom stage AnnListG UName dom stage conDeclRhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UConDecl dom stage Ann UConDecl dom stage Ann UType dom stage Ann UType dom stage conDeclOp :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UConDecl dom stage Ann UConDecl dom stage Ann UOperator dom stage Ann UOperator dom stage conDeclName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UConDecl dom stage Ann UConDecl dom stage Ann UName dom stage Ann UName dom stage conDeclLhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UConDecl dom stage Ann UConDecl dom stage Ann UType dom stage Ann UType dom stage conDeclFields :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UConDecl dom stage Ann UConDecl dom stage AnnListG UFieldDecl dom stage AnnListG UFieldDecl dom stage conDeclArgs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UConDecl dom stage Ann UConDecl dom stage AnnListG UType dom stage AnnListG UType dom stage conTypeCtx :: RefMonads w r => Reference w r MU MU Ann UConDecl dom stage Ann UConDecl dom stage AnnMaybeG UContext dom stage AnnMaybeG UContext dom stage conTypeArgs :: RefMonads w r => Reference w r MU MU Ann UConDecl dom stage Ann UConDecl dom stage AnnListG UTyVar dom stage AnnListG UTyVar dom stage funDepRhs :: RefMonads w r => Reference w r MU MU Ann UFunDep dom stage Ann UFunDep dom stage AnnListG UName dom stage AnnListG UName dom stage funDepLhs :: RefMonads w r => Reference w r MU MU Ann UFunDep dom stage Ann UFunDep dom stage AnnListG UName dom stage AnnListG UName dom stage funDeps :: RefMonads w r => Reference w r MU MU Ann UFunDeps dom stage Ann UFunDeps dom stage AnnListG UFunDep dom stage AnnListG UFunDep dom stage patSigType :: RefMonads w r => Reference w r MU MU Ann UPatternTypeSignature dom stage Ann UPatternTypeSignature dom stage Ann UType dom stage Ann UType dom stage patSigName :: RefMonads w r => Reference w r MU MU Ann UPatternTypeSignature dom stage Ann UPatternTypeSignature dom stage AnnListG UName dom stage AnnListG UName dom stage patOpposite :: RefMonads w r => Reference w r MU MU Ann UPatSynWhere dom stage Ann UPatSynWhere dom stage AnnListG UMatch dom stage AnnListG UMatch dom stage patSynRhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPatSynLhs dom stage Ann UPatSynLhs dom stage Ann UName dom stage Ann UName dom stage patSynOp :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPatSynLhs dom stage Ann UPatSynLhs dom stage Ann UOperator dom stage Ann UOperator dom stage patSynLhs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPatSynLhs dom stage Ann UPatSynLhs dom stage Ann UName dom stage Ann UName dom stage patName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPatSynLhs dom stage Ann UPatSynLhs dom stage Ann UName dom stage Ann UName dom stage patArgs :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPatSynLhs dom stage Ann UPatSynLhs dom stage AnnListG UName dom stage AnnListG UName dom stage patRhsOpposite :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UPatSynRhs dom stage Ann UPatSynRhs dom stage AnnMaybeG UPatSynWhere dom stage AnnMaybeG UPatSynWhere dom stage patRhsPat :: RefMonads w r => Reference w r MU MU Ann UPatSynRhs dom stage Ann UPatSynRhs dom stage Ann UPattern dom stage Ann UPattern dom stage patRhs :: RefMonads w r => Reference w r MU MU Ann UPatternSynonym dom stage Ann UPatternSynonym dom stage Ann UPatSynRhs dom stage Ann UPatSynRhs dom stage patLhs :: RefMonads w r => Reference w r MU MU Ann UPatternSynonym dom stage Ann UPatternSynonym dom stage Ann UPatSynLhs dom stage Ann UPatSynLhs dom stage gadtConResultType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UGadtConType dom stage Ann UGadtConType dom stage Ann UType dom stage Ann UType dom stage gadtConRecordFields :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UGadtConType dom stage Ann UGadtConType dom stage AnnListG UFieldDecl dom stage AnnListG UFieldDecl dom stage gadtConNormalType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UGadtConType dom stage Ann UGadtConType dom stage Ann UType dom stage Ann UType dom stage gadtConTypeCtx :: RefMonads w r => Reference w r MU MU Ann UGadtConDecl dom stage Ann UGadtConDecl dom stage AnnMaybeG UContext dom stage AnnMaybeG UContext dom stage gadtConTypeArgs :: RefMonads w r => Reference w r MU MU Ann UGadtConDecl dom stage Ann UGadtConDecl dom stage AnnListG UTyVar dom stage AnnListG UTyVar dom stage gadtConType :: RefMonads w r => Reference w r MU MU Ann UGadtConDecl dom stage Ann UGadtConDecl dom stage Ann UGadtConType dom stage Ann UGadtConType dom stage gadtConNames :: RefMonads w r => Reference w r MU MU Ann UGadtConDecl dom stage Ann UGadtConDecl dom stage AnnListG UName dom stage AnnListG UName dom stage injAnnRes :: RefMonads w r => Reference w r MU MU Ann UInjectivityAnn dom stage Ann UInjectivityAnn dom stage Ann UTyVar dom stage Ann UTyVar dom stage injAnnDeps :: RefMonads w r => Reference w r MU MU Ann UInjectivityAnn dom stage Ann UInjectivityAnn dom stage AnnListG UName dom stage AnnListG UName dom stage tfTypeVar :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTypeFamilySpec dom stage Ann UTypeFamilySpec dom stage Ann UTyVar dom stage Ann UTyVar dom stage tfSpecKind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTypeFamilySpec dom stage Ann UTypeFamilySpec dom stage Ann UKindConstraint dom stage Ann UKindConstraint dom stage tfInjectivity :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTypeFamilySpec dom stage Ann UTypeFamilySpec dom stage Ann UInjectivityAnn dom stage Ann UInjectivityAnn dom stage tfSpec :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTypeFamily dom stage Ann UTypeFamily dom stage AnnMaybeG UTypeFamilySpec dom stage AnnMaybeG UTypeFamilySpec dom stage tfKind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UTypeFamily dom stage Ann UTypeFamily dom stage AnnMaybeG UKindConstraint dom stage AnnMaybeG UKindConstraint dom stage tfHead :: RefMonads w r => Reference w r MU MU Ann UTypeFamily dom stage Ann UTypeFamily dom stage Ann UDeclHead dom stage Ann UDeclHead dom stage specializeInstanceType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstBodyDecl dom stage Ann UInstBodyDecl dom stage Ann UType dom stage Ann UType dom stage specializeInstance :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstBodyDecl dom stage Ann UInstBodyDecl dom stage Ann USpecializePragma dom stage Ann USpecializePragma dom stage instanceInline :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstBodyDecl dom stage Ann UInstBodyDecl dom stage Ann UInlinePragma dom stage Ann UInlinePragma dom stage instBodyTypeSig :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstBodyDecl dom stage Ann UInstBodyDecl dom stage Ann UTypeSignature dom stage Ann UTypeSignature dom stage instBodyTypeEqn :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstBodyDecl dom stage Ann UInstBodyDecl dom stage Ann UTypeEqn dom stage Ann UTypeEqn dom stage instBodyLhsType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstBodyDecl dom stage Ann UInstBodyDecl dom stage Ann UInstanceRule dom stage Ann UInstanceRule dom stage instBodyGadtCons :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstBodyDecl dom stage Ann UInstBodyDecl dom stage AnnListG UGadtConDecl dom stage AnnListG UGadtConDecl dom stage instBodyDerivings :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstBodyDecl dom stage Ann UInstBodyDecl dom stage AnnListG UDeriving dom stage AnnListG UDeriving dom stage instBodyDeclFunbind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstBodyDecl dom stage Ann UInstBodyDecl dom stage Ann UValueBind dom stage Ann UValueBind dom stage instBodyDataNew :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstBodyDecl dom stage Ann UInstBodyDecl dom stage Ann UDataOrNewtypeKeyword dom stage Ann UDataOrNewtypeKeyword dom stage instBodyDataKind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstBodyDecl dom stage Ann UInstBodyDecl dom stage AnnMaybeG UKindConstraint dom stage AnnMaybeG UKindConstraint dom stage instBodyDataCons :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UInstBodyDecl dom stage Ann UInstBodyDecl dom stage AnnListG UConDecl dom stage AnnListG UConDecl dom stage instBodyDecls :: RefMonads w r => Reference w r MU MU Ann UInstBody dom stage Ann UInstBody dom stage AnnListG UInstBodyDecl dom stage AnnListG UInstBodyDecl dom stage dhRight :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDeclHead dom stage Ann UDeclHead dom stage Ann UTyVar dom stage Ann UTyVar dom stage dhOperator :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDeclHead dom stage Ann UDeclHead dom stage Ann UOperator dom stage Ann UOperator dom stage dhName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDeclHead dom stage Ann UDeclHead dom stage Ann UName dom stage Ann UName dom stage dhLeft :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDeclHead dom stage Ann UDeclHead dom stage Ann UTyVar dom stage Ann UTyVar dom stage dhBody :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDeclHead dom stage Ann UDeclHead dom stage Ann UDeclHead dom stage Ann UDeclHead dom stage dhAppOperand :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDeclHead dom stage Ann UDeclHead dom stage Ann UTyVar dom stage Ann UTyVar dom stage dhAppFun :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDeclHead dom stage Ann UDeclHead dom stage Ann UDeclHead dom stage Ann UDeclHead dom stage pragmaFormula :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UClassElement dom stage Ann UClassElement dom stage Ann UMinimalFormula dom stage Ann UMinimalFormula dom stage clsInline :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UClassElement dom stage Ann UClassElement dom stage Ann UInlinePragma dom stage Ann UInlinePragma dom stage clsFixity :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UClassElement dom stage Ann UClassElement dom stage Ann UFixitySignature dom stage Ann UFixitySignature dom stage ceTypeSig :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UClassElement dom stage Ann UClassElement dom stage Ann UTypeSignature dom stage Ann UTypeSignature dom stage ceTypeFam :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UClassElement dom stage Ann UClassElement dom stage Ann UTypeFamily dom stage Ann UTypeFamily dom stage ceType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UClassElement dom stage Ann UClassElement dom stage Ann UType dom stage Ann UType dom stage ceName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UClassElement dom stage Ann UClassElement dom stage Ann UName dom stage Ann UName dom stage ceKind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UClassElement dom stage Ann UClassElement dom stage Ann UType dom stage Ann UType dom stage ceHead :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UClassElement dom stage Ann UClassElement dom stage Ann UDeclHead dom stage Ann UDeclHead dom stage ceBind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UClassElement dom stage Ann UClassElement dom stage Ann UValueBind dom stage Ann UValueBind dom stage cbElements :: RefMonads w r => Reference w r MU MU Ann UClassBody dom stage Ann UClassBody dom stage AnnListG UClassElement dom stage AnnListG UClassElement dom stage declValBind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UValueBind dom stage Ann UValueBind dom stage declTypes :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnListG UType dom stage AnnListG UType dom stage declTypeSig :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UTypeSignature dom stage Ann UTypeSignature dom stage declTypeFamily :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UTypeFamily dom stage Ann UTypeFamily dom stage declType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UType dom stage Ann UType dom stage declSplice :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann USplice dom stage Ann USplice dom stage declSpec :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnMaybeG UTypeFamilySpec dom stage AnnMaybeG UTypeFamilySpec dom stage declSafety :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnMaybeG USafety dom stage AnnMaybeG USafety dom stage declRoles :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnListG URole dom stage AnnListG URole dom stage declRoleType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UQualifiedName dom stage Ann UQualifiedName dom stage declPragma :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UTopLevelPragma dom stage Ann UTopLevelPragma dom stage declPatTypeSig :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UPatternTypeSignature dom stage Ann UPatternTypeSignature dom stage declPatSyn :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UPatternSynonym dom stage Ann UPatternSynonym dom stage declOverlap :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnMaybeG UOverlapPragma dom stage AnnMaybeG UOverlapPragma dom stage declNewtype :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UDataOrNewtypeKeyword dom stage Ann UDataOrNewtypeKeyword dom stage declName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UName dom stage Ann UName dom stage declKind :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnMaybeG UKindConstraint dom stage AnnMaybeG UKindConstraint dom stage declInstance :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UInstanceRule dom stage Ann UInstanceRule dom stage declInstRule :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UInstanceRule dom stage Ann UInstanceRule dom stage declInstDecl :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnMaybeG UInstBody dom stage AnnMaybeG UInstBody dom stage declHead :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UDeclHead dom stage Ann UDeclHead dom stage declGadt :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnListG UGadtConDecl dom stage AnnListG UGadtConDecl dom stage declFunDeps :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnMaybeG UFunDeps dom stage AnnMaybeG UFunDeps dom stage declForeignType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UType dom stage Ann UType dom stage declFixity :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UFixitySignature dom stage Ann UFixitySignature dom stage declDeriving :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnListG UDeriving dom stage AnnListG UDeriving dom stage declDerivStrat :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnMaybeG UDeriveStrategy dom stage AnnMaybeG UDeriveStrategy dom stage declDecl :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnListG UTypeEqn dom stage AnnListG UTypeEqn dom stage declCtx :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnMaybeG UContext dom stage AnnMaybeG UContext dom stage declCons :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnListG UConDecl dom stage AnnListG UConDecl dom stage declCallConv :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UCallConv dom stage Ann UCallConv dom stage declBody :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage AnnMaybeG UClassBody dom stage AnnMaybeG UClassBody dom stage declAssignedType :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UDecl dom stage Ann UDecl dom stage Ann UType dom stage Ann UType dom stage langExt :: RefMonads w r => Reference w r MU MU Ann ULanguageExtension dom stage Ann ULanguageExtension dom stage String String moduleNameString :: RefMonads w r => Reference w r MU MU Ann UModuleName dom stage Ann UModuleName dom stage String String importRename :: RefMonads w r => Reference w r MU MU Ann UImportRenaming dom stage Ann UImportRenaming dom stage Ann UModuleName dom stage Ann UModuleName dom stage importSpecList :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UImportSpec dom stage Ann UImportSpec dom stage AnnListG UIESpec dom stage AnnListG UIESpec dom stage importSpecHiding :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UImportSpec dom stage Ann UImportSpec dom stage AnnListG UIESpec dom stage AnnListG UIESpec dom stage importSpec :: RefMonads w r => Reference w r MU MU Ann UImportDecl dom stage Ann UImportDecl dom stage AnnMaybeG UImportSpec dom stage AnnMaybeG UImportSpec dom stage importSource :: RefMonads w r => Reference w r MU MU Ann UImportDecl dom stage Ann UImportDecl dom stage AnnMaybeG UImportSource dom stage AnnMaybeG UImportSource dom stage importSafe :: RefMonads w r => Reference w r MU MU Ann UImportDecl dom stage Ann UImportDecl dom stage AnnMaybeG UImportSafe dom stage AnnMaybeG UImportSafe dom stage importQualified :: RefMonads w r => Reference w r MU MU Ann UImportDecl dom stage Ann UImportDecl dom stage AnnMaybeG UImportQualified dom stage AnnMaybeG UImportQualified dom stage importPkg :: RefMonads w r => Reference w r MU MU Ann UImportDecl dom stage Ann UImportDecl dom stage AnnMaybeG UStringNode dom stage AnnMaybeG UStringNode dom stage importModule :: RefMonads w r => Reference w r MU MU Ann UImportDecl dom stage Ann UImportDecl dom stage Ann UModuleName dom stage Ann UModuleName dom stage importAs :: RefMonads w r => Reference w r MU MU Ann UImportDecl dom stage Ann UImportDecl dom stage AnnMaybeG UImportRenaming dom stage AnnMaybeG UImportRenaming dom stage opStr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UFilePragma dom stage Ann UFilePragma dom stage Ann UStringNode dom stage Ann UStringNode dom stage lpPragmas :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UFilePragma dom stage Ann UFilePragma dom stage AnnListG ULanguageExtension dom stage AnnListG ULanguageExtension dom stage modWarningStr :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UModulePragma dom stage Ann UModulePragma dom stage AnnListG UStringNode dom stage AnnListG UStringNode dom stage modDeprecatedPragma :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UModulePragma dom stage Ann UModulePragma dom stage AnnListG UStringNode dom stage AnnListG UStringNode dom stage essList :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann USubSpec dom stage Ann USubSpec dom stage AnnListG UName dom stage AnnListG UName dom stage ieSubspec :: RefMonads w r => Reference w r MU MU Ann UIESpec dom stage Ann UIESpec dom stage AnnMaybeG USubSpec dom stage AnnMaybeG USubSpec dom stage ieName :: RefMonads w r => Reference w r MU MU Ann UIESpec dom stage Ann UIESpec dom stage Ann UName dom stage Ann UName dom stage ieModifier :: RefMonads w r => Reference w r MU MU Ann UIESpec dom stage Ann UIESpec dom stage AnnMaybeG UImportModifier dom stage AnnMaybeG UImportModifier dom stage exportModuleName :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExportSpec dom stage Ann UExportSpec dom stage Ann UModuleName dom stage Ann UModuleName dom stage exportDecl :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU Ann UExportSpec dom stage Ann UExportSpec dom stage Ann UIESpec dom stage Ann UIESpec dom stage espExports :: RefMonads w r => Reference w r MU MU Ann UExportSpecs dom stage Ann UExportSpecs dom stage AnnListG UExportSpec dom stage AnnListG UExportSpec dom stage mhPragma :: RefMonads w r => Reference w r MU MU Ann UModuleHead dom stage Ann UModuleHead dom stage AnnMaybeG UModulePragma dom stage AnnMaybeG UModulePragma dom stage mhName :: RefMonads w r => Reference w r MU MU Ann UModuleHead dom stage Ann UModuleHead dom stage Ann UModuleName dom stage Ann UModuleName dom stage mhExports :: RefMonads w r => Reference w r MU MU Ann UModuleHead dom stage Ann UModuleHead dom stage AnnMaybeG UExportSpecs dom stage AnnMaybeG UExportSpecs dom stage modImports :: RefMonads w r => Reference w r MU MU Ann UModule dom stage Ann UModule dom stage AnnListG UImportDecl dom stage AnnListG UImportDecl dom stage modHead :: RefMonads w r => Reference w r MU MU Ann UModule dom stage Ann UModule dom stage AnnMaybeG UModuleHead dom stage AnnMaybeG UModuleHead dom stage modDecl :: RefMonads w r => Reference w r MU MU Ann UModule dom stage Ann UModule dom stage AnnListG UDecl dom stage AnnListG UDecl dom stage filePragmas :: RefMonads w r => Reference w r MU MU Ann UModule dom stage Ann UModule dom stage AnnListG UFilePragma dom stage AnnListG UFilePragma dom stage semanticsLitType :: () => Ann ULiteral IdDom st -> Type -- | Domains that have semantic information for names type HasNameInfo dom = (Domain dom, HasNameInfo' SemanticInfo dom UQualifiedName) -- | Infos that may have a name that can be extracted class HasNameInfo' si semanticsName :: HasNameInfo' si => si -> Maybe Name -- | Domains that have semantic information for literals type HasLiteralInfo dom = (Domain dom, HasLiteralInfo' SemanticInfo dom ULiteral) -- | Info of types class HasLiteralInfo' si semanticsLiteralType :: HasLiteralInfo' si => si -> Type type HasIdInfo dom = (Domain dom, HasIdInfo' SemanticInfo dom UQualifiedName) -- | Infos that may have a typed name that can be extracted class HasNameInfo' si => HasIdInfo' si semanticsId :: HasIdInfo' si => si -> Id type HasFixityInfo dom = (Domain dom, HasFixityInfo' SemanticInfo dom UQualifiedName) -- | Infos that may have a fixity information class HasFixityInfo' si semanticsFixity :: HasFixityInfo' si => si -> Maybe Fixity type HasScopeInfo dom = (Domain dom, HasScopeInfo' SemanticInfo dom UQualifiedName, HasScopeInfo' SemanticInfo dom UExpr) -- | Infos that contain the names that are available in theirs scope class HasScopeInfo' si semanticsScope :: HasScopeInfo' si => si -> Scope type HasDefiningInfo dom = (Domain dom, HasDefiningInfo' SemanticInfo dom UQualifiedName) -- | Infos that store if they were used to define a name class HasDefiningInfo' si semanticsDefining :: HasDefiningInfo' si => si -> Bool class HasSourceInfoInSema' si semanticsSourceInfo :: HasSourceInfoInSema' si => si -> Maybe SrcSpan type HasModuleInfo dom = (Domain dom, HasModuleInfo' SemanticInfo dom UModule) class HasModuleInfo' si semanticsModule :: HasModuleInfo' si => si -> Module semanticsDynFlags :: HasModuleInfo' si => si -> DynFlags isBootModule :: HasModuleInfo' si => si -> Bool semanticsImplicitImports :: HasModuleInfo' si => si -> [Name] semanticsPrelTransMods :: HasModuleInfo' si => si -> [Module] type HasImportInfo dom = (Domain dom, HasImportInfo' SemanticInfo dom UImportDecl) class HasImportInfo' si semanticsImportedModule :: HasImportInfo' si => si -> Module semanticsAvailable :: HasImportInfo' si => si -> [Name] semanticsImported :: HasImportInfo' si => si -> [Name] semanticsTransMods :: HasImportInfo' si => si -> [Module] type HasImplicitFieldsInfo dom = (Domain dom, HasImplicitFieldsInfo' SemanticInfo dom UFieldWildcard) class HasImplicitFieldsInfo' si semanticsImplicitFlds :: HasImplicitFieldsInfo' si => si -> [(Name, Name)] type HasNoSemanticInfo dom (si :: * -> * -> *) = SemanticInfo dom si ~ NoSemanticInfo -- | Gets the class and family instances from a module. getInstances :: GhcMonad m => [Module] -> m ([ClsInst], [FamInst]) data UsageSpec UsageSpec :: Bool -> String -> String -> UsageSpec [usageQualified] :: UsageSpec -> Bool [usageQualifier] :: UsageSpec -> String [usageAs] :: UsageSpec -> String -- | Put the given string before the element if it is not empty after :: AfterBefore i => String -> i -> i -- | The given string should follow the element if it is not empty followedBy :: AfterBefore i => String -> i -> i -- | The element should be indented relatively to its parent relativeIndented :: RelativeIndent i => Int -> i -> i -- | The elements should be indented at least to the given number of spaces minimumIndented :: MinimumIndent i => Int -> i -> i fixMainRange :: () => StringBuffer -> Ann UModule dom RangeStage -> Ann UModule dom RangeStage prepareASTCpp :: () => StringBuffer -> Ann UModule dom RangeStage -> Ann UModule dom SrcTemplateStage -- | Prepares the AST for pretty printing prepareAST :: () => StringBuffer -> Ann UModule dom RangeStage -> Ann UModule dom SrcTemplateStage -- | The elements of the list should be indented on the same column indented :: ListInfo SrcTemplateStage -> ListInfo SrcTemplateStage -- | The elements of the list should be separated by the given string by -- default (might be overridden) separatedBy :: String -> ListInfo SrcTemplateStage -> ListInfo SrcTemplateStage list :: ListInfo SrcTemplateStage opt :: OptionalInfo SrcTemplateStage child :: SpanInfo SrcTemplateStage -- | Marks template elements in the AST that should always be present in -- the source code, regardless of their containing elements being -- deleted. Currently it recognizes CPP pragmas (lines starting with #) -- This function should only be applied to an AST if CPP is enabled. extractStayingElems :: SourceInfoTraversal node => Ann node dom SrcTemplateStage -> Ann node dom SrcTemplateStage -- | Partitions the source file in the order where the parts are used in -- the AST mapLocIndices :: Ord k => StringBuffer -> Set (RealSrcLoc, k) -> Map k String -- | Assigns an index (in the order they are used) for each range getLocIndices :: SourceInfoTraversal e => Ann e dom RngTemplateStage -> Set (RealSrcLoc, Int) rangeToSource :: SourceInfoTraversal node => StringBuffer -> Ann node dom RngTemplateStage -> Ann node dom SrcTemplateStage lineEndings :: Partial SourceTemplateTextElem SourceTemplateTextElem String String sourceTemplateText :: Lens SourceTemplateTextElem SourceTemplateTextElem String String sourceTemplateTextRange :: Partial SourceTemplateElem SourceTemplateElem SrcSpan SrcSpan sourceTemplateTextElem :: Partial SourceTemplateElem SourceTemplateElem [SourceTemplateTextElem] [SourceTemplateTextElem] isStayingText :: SourceTemplateTextElem -> Bool srcTmpOptMinimalIndent :: Simple Lens OptionalInfo SrcTemplateStage Int srcTmpOptAfter :: Simple Lens OptionalInfo SrcTemplateStage String srcTmpOptBefore :: Simple Lens OptionalInfo SrcTemplateStage String sourceTemplateOptRange :: Simple Lens OptionalInfo SrcTemplateStage SrcSpan srcTmpListMinimalIndent :: Simple Lens ListInfo SrcTemplateStage Int srcTmpSeparators :: Simple Lens ListInfo SrcTemplateStage [([SourceTemplateTextElem], SrcSpan)] srcTmpIndented :: Simple Lens ListInfo SrcTemplateStage Maybe [Bool] srcTmpDefaultSeparator :: Simple Lens ListInfo SrcTemplateStage String srcTmpListAfter :: Simple Lens ListInfo SrcTemplateStage String srcTmpListBefore :: Simple Lens ListInfo SrcTemplateStage String sourceTemplateListRange :: Simple Lens ListInfo SrcTemplateStage SrcSpan sourceTemplateMinimalIndent :: Simple Lens SpanInfo SrcTemplateStage Int sourceTemplateNodeElems :: Simple Lens SpanInfo SrcTemplateStage [SourceTemplateElem] sourceTemplateNodeRange :: Simple Lens SpanInfo SrcTemplateStage SrcSpan -- | An element of a source template for a singleton AST node. data SourceTemplateElem -- | Source text belonging to the current node TextElem :: [SourceTemplateTextElem] -> SrcSpan -> SourceTemplateElem [_sourceTemplateTextElem] :: SourceTemplateElem -> [SourceTemplateTextElem] [_sourceTemplateTextRange] :: SourceTemplateElem -> SrcSpan -- | Placeholder for the next children of the node ChildElem :: SourceTemplateElem data SourceTemplateTextElem NormalText :: String -> SourceTemplateTextElem [_sourceTemplateText] :: SourceTemplateTextElem -> String StayingText :: String -> String -> SourceTemplateTextElem [_sourceTemplateText] :: SourceTemplateTextElem -> String [_lineEndings] :: SourceTemplateTextElem -> String -- | Modifies ranges to contain their children fixRanges :: SourceInfoTraversal node => Ann node dom RangeStage -> Ann node dom NormRangeStage -- | Creates a source template from the ranges and the input file. All -- source ranges must be good ranges. cutUpRanges :: SourceInfoTraversal node => Ann node dom NormRangeStage -> Ann node dom RngTemplateStage data BreakUpProblem BreakUpProblem :: RealSrcSpan -> SrcSpan -> [SrcSpan] -> BreakUpProblem [bupOuter] :: BreakUpProblem -> RealSrcSpan [bupInner] :: BreakUpProblem -> SrcSpan [bupSiblings] :: BreakUpProblem -> [SrcSpan] data TransformationProblem TransformationProblem :: String -> TransformationProblem -- | Puts comments in the nodes they should be attached to. Watches for -- lexical tokens that may divide the comment and the supposed element. -- Leaves the AST in a state where parent nodes does not contain all of -- their children. placeComments :: RangeInfo stage => Map ApiAnnKey [SrcSpan] -> Map SrcSpan [Located AnnotationComment] -> Ann UModule dom stage -> Ann UModule dom stage getPragmaComments :: Map SrcSpan [Located AnnotationComment] -> Map String [Located String] getNormalComments :: Map SrcSpan [Located AnnotationComment] -> Map SrcSpan [Located AnnotationComment] -- | Forall types ( forall x y . type ) -- | Type with a context ( C a => type ) -- | Function types ( a -> b ) -- | Tuple types ( (a,b) ) -- | Unboxed tuple types ( (#a,b#) ) -- | List type with special syntax ( [a] ) -- | Parallel array type ( [:a:] ) -- | Type application ( F a ) -- | Infix type constructor ( (a <: b) ) -- | Type surrounded by parentheses ( (T a) ) -- | Type variable or constructor ( a ) -- | Type with explicit kind signature ( a :: * ) -- | Strict type marked with !. -- | Lazy type marked with ~. (Should only be used if -- Strict or StrictData language extension is used) -- | Strict type marked with UNPACK pragma. (Usually contains the bang -- mark.) -- | Strict type marked with NOUNPACK pragma. (Usually contains the bang -- mark.) -- | A wildcard type ( _ ) with -XPartialTypeSignatures -- | A named wildcard type ( _t ) with -- -XPartialTypeSignatures -- | A Template Haskell splice type ( $(genType) ). -- | A Template Haskell splice type ( $(genType) ). -- | Numeric value promoted to the type level. -- | String value promoted to the type level. -- | A data constructor value promoted to the type level. -- | A list of elements as a type. -- | A tuple of elements as a type. -- | Kind of the unit value (). -- | An unboxed sum type. -- | Type variable declaration -- | Kinded type variable declaration ( v :: * ) -- | A context of assertions ( C a => ... ) -- | Class assertion (Cls x) -- | Infix class assertion, also contains type equations ( a ~ X y -- ) -- | Assertion for implicit parameter binding ( ?cmp :: a -> a -> -- Bool ) -- | A list of assertions ( (Eq a, Show a) ) -- | A simple name splice: $generateX -- | A splice with parentheses: $(generate input) -- | Template haskell quasi-quotation: [quoter|str] -- | Expression bracket ( [| x + y |] ) -- | Pattern bracket ( [p| Point x y |] ) -- | Type bracket ( [t| (Int,Int) |] ) -- | Declaration bracket ( [d| f :: Int -> Int; f x = x*x |] ) -- | An expression for a variable or a data constructor ( a ) -- | A literal expression ( 42 ) -- | An infix operator application ( a + b ) -- | Prefix operator application ( -x ) -- | Function application ( f 4 ) -- | Lambda expression ( \a b -> a + b ) -- | Local binding ( let x = 2; y = 3 in e x y ) -- | If expression ( if a then b else c ) -- | Multi way if expressions with MultiWayIf extension ( if | -- guard1 -> expr1; guard2 -> expr2 ) -- | Pattern matching expression ( case expr of pat1 -> expr1; pat2 -- -> expr2 ) -- | Do-notation expressions ( do x <- act1; act2 ) -- | MDo-notation expressions ( mdo x <- act1; act2 ) -- | Tuple expression ( (e1, e2, e3) ) -- | Unboxed tuple expression ( (# e1, e2, e3 #) ) -- | Tuple section, enabled with TupleSections ( (a,,b) -- ). One of the elements must be missing. -- | Unboxed tuple section enabled with TupleSections ( () -- ). One of the elements must be missing. -- | List expression: [1,2,3] -- | Parallel array expression: [: 1,2,3 :] -- | Parenthesized expression: ( a + b ) -- | Left operator section: (1+) -- | Right operator section: (+1) -- | Record value construction: Point { x = 3, y = -2 } -- | Record value update: p1 { x = 3, y = -2 } -- | Enumeration expression ( [1,3..10] ) -- | Parallel array enumeration ( [: 1,3 .. 10 :] ) -- | List comprehension ( [ (x, y) | x <- xs | y <- ys ] ) -- | Parallel array comprehensions [: (x, y) | x <- xs , y <- ys -- :] enabled by ParallelArrays -- | Explicit type signature ( x :: Int ) -- | Explicit type application ( show @Integer (read "5") ) -- | 'x for template haskell reifying of expressions -- | ''T for template haskell reifying of types -- | Template haskell bracket expression -- | Template haskell splice expression, for example: $(gen a) or -- $x -- | Template haskell quasi-quotation: [$quoter|str] -- | Template haskell quasi-quotation: [$quoter|str] -- | Arrow definition: proc a -> f -< a+1 -- | Arrow definition: proc a -> f -< a+1 -- | Lambda case ( case 0 -> 1; 1 -> 2 ) -- | Static pointer expression ( static e ). The inner expression -- must be closed (cannot have variables bound outside) -- | Update of a field ( x = 1 ) -- | Update the field to the value of the same name ( x ) -- | Update the fields of the bounded names to their values ( .. -- ). Must be the last initializer. Cannot be used in a record -- update expression. -- | An existing element in a tuple section -- | A missing element in a tuple section -- | Clause of case expression ( Just x -> x + 1 ) -- | Unguarded right-hand side a pattern match ( -> 3 ) -- | Guarded right-hand sides of a pattern match ( | x == 1 -> 3; | -- otherwise -> 4 ) -- | A guarded right-hand side of pattern matches binding ( | x > 3 -- -> 2 ) -- | A CORE pragma for adding notes to expressions. -- | An SCC pragma for defining cost centers for profiling -- | A pragma that describes if an expression was generated from a code -- fragment by an external tool ( {--} ) -- | In-AST source ranges (for generated pragmas) -- | An arrow application command ( f -< x + 1 ) -- | A form command ( (|untilA (increment -< x+y) (within 0.5 -< -- x)|) ) -- | A function application command -- | An infix command application -- | An infix command application -- | A parenthesized command -- | A pattern match command -- | An if command ( if f x y then g -< x+1 else h -< y+2 ) -- | A local binding command ( let z = x+y ) -- | A local binding command ( let z = x+y ) -- | Left arrow application: -< -- | Right arrow application: >- -- | Left arrow high application: -<< -- | Right arrow high application: >>- -- | A hole expression _ -- | Binding statement ( x <- action ) -- | Non-binding statement ( action ) -- | Let statement ( let x = 3; y = 4 ) -- | A recursive binding statement with ( rec b <- f a c; c <- f -- b a ) -- | Body of a list comprehension: ( | x <- [1..10] ) -- | Normal monadic statement of a list comprehension -- | Then statements by TransformListComp ( then sortWith by -- (x + y) ) -- | Grouping statements by TransformListComp ( then group by -- (x + y) using groupWith ) -- | Binding statement command ( x <- action ) -- | Non-binding statement command ( action ) -- | Let statement command ( let x = 3; y = 4 ) -- | A recursive binding statement command with ( rec b <- f a c; c -- <- f b a ) -- | Pattern name binding -- | Literal pattern -- | Infix constructor application pattern ( a :+: b ) -- | Constructor application pattern ( Point x y ) -- | Tuple pattern ( (x,y) ) -- | Unboxed tuple pattern ( (# x, y #) ) -- | List pattern ( [1,2,a,x] ) -- | Parallel array pattern ( [:1,2,a,x:] ) -- | Parenthesised patterns -- | Record pattern ( Point { x = 3, y } ) -- | As-pattern (explicit name binding) ( ls@(hd:_) ) -- | Wildcard pattern: ( _ ) -- | Irrefutable pattern ( ~(x:_) ) -- | Bang pattern ( !x ) -- | Pattern with explicit type signature ( x :: Int ) -- | View pattern ( f -> Just 1 ) -- | Splice patterns: $(generateX inp) -- | Quasi-quoted patterns: [| 1 + 2 |] -- | Named field pattern ( p = Point 3 2 ) -- | Named field pun ( p ) -- | Wildcard field pattern ( .. ) -- | A normal operator used as an operator. -- | A normal name used as an operator with backticks: a `mod` b -- | A normal, non-operator name. -- | Parenthesized name: foldl (+) 0 -- | Creates an implicit name: ?var -- | Program elements formatted as string literals (import packages, pragma -- texts) -- | Possibly qualified name. -- | Parts of a qualified name. -- | The representation of a haskell module, that is a separate compilation -- unit. It may or may not have a header. -- | Module declaration with name and (optional) exports -- | A list of export specifications surrounded by parentheses -- | Export a name and related names -- | The export of an imported module ( module A ) -- | Marks a name to be imported or exported with related names -- (subspecifier) -- | (..): a class exported with all of its methods, or a datatype -- exported with all of its constructors. -- | (a,b,c): a class exported with some of its methods, or a -- datatype exported with some of its constructors. -- | LANGUAGE pragma, listing the enabled language extensions in -- that file -- | OPTIONS pragma, possibly qualified with a tool, e.g. -- OPTIONS_GHC -- | The name of the enabled language extension, for example ( -- LambdaCase ) -- | A warning pragma attached to the module -- | A deprecated pragma attached to the module -- | Character literal: c -- | String literal: "abc" -- | Integer literal: 12 -- | Fractional literal: 3.14 -- | Primitive integer literal (of type Int#): 32# -- | Primitive word literal (of type Word#): 32## -- | Primitive float literal (of type Float#): 3.14# -- | Primitive double literal (of type Double#): 3.14## -- | Primitive character literal (of type Char#): -- c# -- | Primitive string literal (of type Addr#): "xxx"# -- | Kind constraint ( :: * -> * ) -- | *, the kind of types -- | #, the kind of unboxed types -- | ->, the kind of type constructor -- | A parenthesised kind -- | Kind variable (using PolyKinds extension) -- | Kind application ( k1 k2 ) -- | A list kind ( [k] ) -- | Numeric value promoted to the kind level. -- | String value promoted to the kind level. -- | A data constructor value promoted to the kind level. -- | A list of elements as a kind. -- | A tuple of elements as a kind. -- | Kind of the unit value (). -- | A type synonym ( type String = [Char] ) -- | Standalone deriving declaration ( deriving instance X T ) -- | Fixity declaration ( infixl 5 +, - ) -- | Default types ( default (T1, T2) ) -- | Type signature declaration ( f :: Int -> Int ) -- | Function or value binding ( f x = 12 ) -- | A Template Haskell splice declaration ( $(generateDecls) ) -- | A data or newtype declaration. Empty data type declarations without -- where keyword are always belong to DataDecl. -- | A GADT-style data or newtype declaration. -- | GADT constructor declaration ( D1 :: Int -> T String ) -- | GADT constructor declaration with record syntax ( D1 :: { val :: -- Int } -> T String ) -- | Ordinary data constructor ( C t1 t2 ) -- | Creates a record data constructor ( Point { x :: Double, y :: -- Double } ) -- | Infix data constructor ( t1 :+: t2 ) -- | Field declaration ( fld :: Int ) -- | A deriving clause without parentheses ( deriving Show . -- | A deriving clause without parentheses, with/witohut strategy ( -- deriving stock Show . -- | A deriving clause with parentheses deriving (Show, Eq) ) -- | A deriving clause with parentheses, with/witohut strategy ( -- deriving stock (Show, Eq) . -- | A list of functional dependencies: | a -> b, c -> d -- separated by commas -- | A functional dependency, given on the form l1 ... ln -> r1 ... -- rn -- | Type class declaration ( class X a [where f = ...] ) -- | The list of declarations that can appear in a typeclass -- | Type signature: f :: A -> B as a class member -- | Default binding: f x = "aaa" as a class member -- | Declaration of an associated type synonym: type T x :: * in -- a class -- | Declaration of an associated data synonym: data T x :: * in -- a class -- | Default choice for type synonym: type T x = TE or type -- instance T x = TE in a class -- | Default signature (by using DefaultSignatures): default -- enum :: (Generic a, GEnum (Rep a)) => [a] -- | Minimal pragma: {-# MINIMAL (==) | (/=) #-} in a class -- | One of the minimal formulas are needed ( min1 | min2 ) -- | Both of the minimal formulas are needed ( min1 , min2 ) -- | Type or class name as a declaration head -- | Parenthesized type as a declaration head -- | Type application as a declaration head -- | Infix type application as a declaration head -- | Instance declaration ( instance X T [where f = ...] ) -- | Instance body is the implementation of the class functions ( where -- a x = 1; b x = 2 ) -- | A normal value binding ( f x = 12 ) inside a class instance -- | Type signature in instance definition with InstanceSigs -- | An associated type definition ( type A X = B ) in a class -- instance -- | An associated data definition ( data A X = B Int | C ) in a -- class instance -- | An associated data definition as a GADT ( data A X where B :: Int -- -> A X ) in a class instance -- | Specialize instance pragma in a class instance (no phase selection is -- allowed) -- | Instance head as an instance rule ( X a => Y a ) -- | Type or class name as an instance head -- | Infix application of the type/class name to the left operand as an -- instance head -- | Parenthesized instance head -- | Type application as an instance head -- | OVERLAP pragma -- | NO_OVERLAP pragma -- | OVERLAPPABLE pragma -- | OVERLAPPING pragma -- | OVERLAPS pragma -- | INCOHERENT pragma -- | Role annotations ( type role Ptr representational ) -- | Foreign import ( foreign import foo :: Int -> IO Int ) -- | Foreign export ( foreign export ccall foo :: Int -> IO Int -- ) -- | Specifies stdcall calling convention for foreign -- import/export. -- | Specifies ccall calling convention for foreign import/export. -- | Specifies capi calling convention for foreign import/export. -- | Specifies that the given foreign import is unsafe. -- | Pattern synonyms ( pattern Arrow t1 t2 = App "->" [t1, t2] -- ) -- | A left hand side with a constructor name and arguments ( Arrow t1 -- t2 ) -- | An infix pattern synonym left-hand side ( t1 :+: t2 ) -- | A record-style pattern synonym left-hand side ( Arrow { arrowFrom, -- arrowTo } ) -- | An automatically two-way pattern synonym ( = App "Int" [] ) -- | A pattern synonym that can be only used for pattenr matching but not -- for combining ( <- App "Int" [] ) -- | A pattern synonym with the other direction explicitly specified ( -- <- App "Int" [] where Int = App "Int" [] ) -- | Pattern type signature declaration ( pattern Succ :: Int -> Int -- ) -- | Type family declaration ( type family A a :: * -> * ) -- | Data family declaration ( data family A a :: * -> * ) -- | Type family instance declaration ( type instance Fam T = AssignedT -- ) -- | Data instance declaration ( data instance Fam T = Con1 | Con2 -- ) -- | GADT-style data instance declaration ( data instance Fam T where -- ... ) -- | A closed type family declaration -- | Specifies the kind of a type family ( :: * -> * ) -- | Specifies the injectivity of a type family ( = r | r -> a -- ) -- | Type equations as found in closed type families ( T A = S ) -- | Top-level pragmas -- | A pragma that introduces source rewrite rules ( {-# RULES -- "map/map" [2] forall f g xs. map f (map g xs) = map (f.g) xs #-} -- ) -- | A pragma that marks definitions as deprecated ( {-# DEPRECATED f -- "f will be replaced by g" #-} ) -- | A pragma that marks definitions as deprecated ( {-# WARNING -- unsafePerformIO "you should know what you are doing" #-} ) -- | A pragma that annotates a definition with an arbitrary value ( {-# -- ANN f 42 #-} ) -- | A pragma that marks a function for inlining to the compiler ( {-# -- INLINE thenUs #-} ) -- | A pragma that forbids a function from being inlined by the compiler -- ( {-# NOINLINE f #-} ) -- | A pragma that marks a function that it may be inlined by the compiler -- ( {-# INLINABLE thenUs #-} ) -- | A pragma for maintaining line numbers in generated sources ( {-# -- LINE 123 "somefile" #-} ) -- | A pragma that tells the compiler that a polymorph function should be -- optimized for a given type ( {-# SPECIALISE f :: Int -> b -> -- b #-} ) -- | Marks that the pragma should be applied from a given compile phase -- ( [2] ) -- | Marks that the pragma should be applied until a given compile phase -- ( [~2] ) -- | A rewrite rule ( "map/map" forall f g xs. map f (map g xs) = map -- (f.g) xs ) -- | The definition with the given name is annotated -- | A type with the given name is annotated -- | The whole module is annotated -- | A CONLIKE modifier for an INLINE pragma. -- | Non-function binding ( v = "12" ) -- | Function binding ( f 0 = 1; f x = x ). All matches must have -- the same name. -- | Clause of function binding -- | A match lhs with the function name and parameter names ( f a b -- ) -- | An infix match lhs for an operator ( a + b ) -- | Local bindings attached to a declaration ( where x = 42 ) -- | A local binding for a value -- | A local type signature -- | A local fixity declaration -- | A type signature ( f :: Int -> Int ) -- | A left-associative fixity declaration ( infixl 5 +, - ). -- | A right-associative fixity declaration ( infixr 5 +, - ). -- | A non-associative fixity declaration ( infix 5 +, - ). -- | An unguarded right-hand-side ( = 3 ) -- | An unguarded right-hand-side ( | x == 1 = 3; | otherwise = 4 -- ) -- | A guarded right-hand side of a value binding ( | x > 3 = 2 -- ) -- | A bind statement in a pattern guard ( Just v <- x ) -- | A let statement in a pattern guard ( let x = 3 ) -- | An expression to check for a pattern guard -- | Creates an expression to check for a pattern guard mkGuardCheck :: Expr -> RhsGuard -- | Creates a let statement in a pattern guard ( let x = 3 ) mkGuardLet :: [LocalBind] -> RhsGuard -- | Creates a bind statement in a pattern guard ( Just v <- x -- ) mkGuardBind :: Pattern -> Expr -> RhsGuard -- | Creates a guarded right-hand side of a value binding ( | x > 3 -- = 2 ) mkGuardedRhs :: [RhsGuard] -> Expr -> GuardedRhs -- | Creates an unguarded right-hand-side ( | x == 1 = 3; | otherwise = -- 4 ) mkGuardedRhss :: [GuardedRhs] -> Rhs -- | Creates an unguarded right-hand-side ( = 3 ) mkUnguardedRhs :: Expr -> Rhs -- | Creates a non-associative fixity declaration ( infix 5 +, - -- ). mkInfix :: Int -> Operator -> FixitySignature -- | Creates a right-associative fixity declaration ( infixr 5 +, - -- ). mkInfixR :: Int -> Operator -> FixitySignature -- | Creates a left-associative fixity declaration ( infixl 5 +, - -- ). mkInfixL :: Int -> Operator -> FixitySignature -- | Creates a type signature ( f :: Int -> Int ) mkTypeSignature :: Name -> Type -> TypeSignature -- | Creates a local fixity declaration mkLocalFixity :: FixitySignature -> LocalBind -- | Creates a local type signature mkLocalTypeSig :: TypeSignature -> LocalBind -- | Creates a local binding for a value mkLocalValBind :: ValueBind -> LocalBind mkLocalBinds' :: [LocalBind] -> LocalBinds -- | Local bindings attached to a declaration ( where x = 42 ) mkLocalBinds :: [LocalBind] -> MaybeLocalBinds -- | Creates an infix match lhs for an operator ( a + b ) mkInfixLhs :: Pattern -> Operator -> Pattern -> [Pattern] -> MatchLhs -- | Creates a match lhs with the function name and parameter names ( f -- a b ) mkMatchLhs :: Name -> [Pattern] -> MatchLhs -- | Creates a clause of function binding mkMatch :: MatchLhs -> Rhs -> Maybe LocalBinds -> Match -- | A simplified function for creating function bindings without local -- definitions or guards. mkFunctionBind' :: Name -> [([Pattern], Expr)] -> ValueBind -- | Creates a function binding ( f 0 = 1; f x = x ). All matches -- must have the same name. mkFunctionBind :: [Match] -> ValueBind -- | Creates a value binding ( v = "12" ). mkSimpleBind :: Pattern -> Rhs -> Maybe LocalBinds -> ValueBind -- | A simplified function to generate simple value bindings without local -- definitions, guards or complex lhs. mkSimpleBind' :: Name -> Expr -> ValueBind -- | A CONLIKE modifier for an INLINE pragma. mkConlikeAnnotation :: ConlikeAnnot -- | The whole module is annotated mkModuleAnnotation :: AnnotationSubject -- | A type with the given name is annotated mkTypeAnnotation :: Name -> AnnotationSubject -- | The definition with the given name is annotated mkNameAnnotation :: Name -> AnnotationSubject mkRuleVar :: Name -> RuleVar -- | A rewrite rule ( "map/map" forall f g xs. map f (map g xs) = map -- (f.g) xs ) mkRewriteRule :: String -> Maybe PhaseControl -> [RuleVar] -> Expr -> Expr -> Rule -- | Marks that the pragma should be applied until a given compile phase -- ( [~2] ) mkPhaseControlUntil :: Integer -> PhaseControl -- | Marks that the pragma should be applied from a given compile phase -- ( [2] ) mkPhaseControlFrom :: Integer -> PhaseControl -- | A pragma that tells the compiler that a polymorph function should be -- optimized for a given type ( {-# SPECIALISE f :: Int -> b -> -- b #-} ) mkSpecializePragma :: Maybe PhaseControl -> Name -> [Type] -> TopLevelPragma -- | A pragma for maintaining line numbers in generated sources ( {-# -- LINE 123 "somefile" #-} ) mkLinePragma :: Int -> Maybe StringNode -> TopLevelPragma -- | A pragma that marks a function that it may be inlined by the compiler -- ( {-# INLINABLE thenUs #-} ) mkInlinablePragma :: Maybe PhaseControl -> Name -> TopLevelPragma -- | A pragma that forbids a function from being inlined by the compiler -- ( {-# NOINLINE f #-} ) mkNoInlinePragma :: Name -> TopLevelPragma -- | A pragma that marks a function for inlining to the compiler ( {-# -- INLINE thenUs #-} ) mkInlinePragma :: Maybe ConlikeAnnot -> Maybe PhaseControl -> Name -> TopLevelPragma -- | A pragma that annotates a definition with an arbitrary value ( {-# -- ANN f 42 #-} ) mkAnnPragma :: AnnotationSubject -> Expr -> TopLevelPragma -- | A pragma that marks definitions as deprecated ( {-# WARNING -- unsafePerformIO "you should know what you are doing" #-} ) mkWarningPragma :: [Name] -> String -> TopLevelPragma -- | A pragma that marks definitions as deprecated ( {-# DEPRECATED f -- "f will be replaced by g" #-} ) mkDeprPragma :: [Name] -> String -> TopLevelPragma -- | A pragma that introduces source rewrite rules ( {-# RULES -- "map/map" [2] forall f g xs. map f (map g xs) = map (f.g) xs #-} -- ) mkRulePragma :: [Rule] -> TopLevelPragma -- | Creates a top-level pragmas mkPragmaDecl :: TopLevelPragma -> Decl mkPatternSignature :: [Name] -> Type -> PatternSignature -- | Creates a pattern type signature declaration ( pattern Succ :: Int -- -> Int ) mkPatternSignatureDecl :: PatternSignature -> Decl -- | Creates a pattern synonym with the other direction explicitly -- specified ( <- App "Int" [] where Int = App "Int" [] ) mkTwoWayPatSyn :: Pattern -> [Match] -> PatSynRhs -- | Creates a pattern synonym that can be only used for pattenr matching -- but not for combining ( <- App "Int" [] ) mkOneWayPatSyn :: Pattern -> PatSynRhs -- | Creates an automatically two-way pattern synonym ( = App "Int" [] -- ) mkSymmetricPatSyn :: Pattern -> PatSynRhs -- | Creates a record-style pattern synonym left-hand side ( Arrow { -- arrowFrom, arrowTo } ) mkRecordPatSyn :: Name -> [Name] -> PatSynLhs -- | Creates an infix pattern synonym left-hand side ( t1 :+: t2 ) mkInfixPatSyn :: Name -> Operator -> Name -> PatSynLhs -- | Creates a left hand side of a pattern synonym with a constructor name -- and arguments ( Arrow t1 t2 ) mkConPatSyn :: Name -> [Name] -> PatSynLhs -- | Creates a pattern synonym ( pattern Arrow t1 t2 = App "->" [t1, -- t2] ) mkPatternSynonym :: PatSynLhs -> PatSynRhs -> Decl -- | Creates a GADT-style data instance declaration ( data instance Fam -- T where ... ) mkGadtDataInstance :: DataOrNewtypeKeyword -> InstanceRule -> Maybe KindConstraint -> [GadtConDecl] -> Decl -- | Creates a data instance declaration ( data instance Fam T = Con1 | -- Con2 ) mkDataInstance :: DataOrNewtypeKeyword -> InstanceRule -> [ConDecl] -> [Deriving] -> Decl -- | Creates a type family instance declaration ( type instance Fam T = -- AssignedT ) mkTypeInstance :: InstanceRule -> Type -> Decl -- | Type equations as found in closed type families ( T A = S ) mkTypeEqn :: Type -> Type -> TypeEqn -- | Specifies the injectivity of a type family ( = r | r -> a -- ) mkTypeFamilyInjectivitySpec :: TyVar -> [Name] -> TypeFamilySpec -- | Specifies the kind of a type family ( :: * -> * ) mkTypeFamilyKindSpec :: KindConstraint -> TypeFamilySpec -- | Creates a data family declaration ( data family A a :: * -> * -- ) mkDataFamily :: DeclHead -> Maybe KindConstraint -> Decl -- | Creates a closed type family declaration ( type family F x where F -- Int = (); F a = Int ) mkClosedTypeFamily :: DeclHead -> Maybe TypeFamilySpec -> [TypeEqn] -> Decl -- | Creates a type family declaration ( type family F x ) mkTypeFamily :: DeclHead -> Maybe TypeFamilySpec -> Decl -- | Specifies that the given foreign import is unsafe. mkUnsafe :: Safety -- | Specifies capi calling convention for foreign import/export. mkCApi :: CallConv -- | Specifies ccall calling convention for foreign import/export. mkCCall :: CallConv -- | Specifies stdcall calling convention for foreign -- import/export. mkStdCall :: CallConv -- | Creates a foreign export ( foreign export ccall foo :: Int -> -- IO Int ) mkForeignExport :: CallConv -> Name -> Type -> Decl -- | Creates a foreign import ( foreign import foo :: Int -> IO Int -- ) mkForeignImport :: CallConv -> Maybe Safety -> Name -> Type -> Decl -- | Marks a given type parameter as phantom. mkPhantomRole :: Role -- | Marks a given type parameter as representational. mkRepresentationalRole :: Role -- | Marks a given type parameter as nominal. mkNominalRole :: Role -- | Creates a role annotations ( type role Ptr representational ) mkRoleDecl :: QualifiedName -> [Role] -> Decl -- | INCOHERENT pragma for type instance definitions mkIncoherentOverlap :: OverlapPragma -- | OVERLAPS pragma for type instance definitions mkOverlaps :: OverlapPragma -- | OVERLAPPING pragma for type instance definitions mkOverlapping :: OverlapPragma -- | OVERLAPPABLE pragma for type instance definitions mkOverlappable :: OverlapPragma -- | NO_OVERLAP pragma for type instance definitions mkDisableOverlap :: OverlapPragma -- | OVERLAP pragma for type instance definitions mkEnableOverlap :: OverlapPragma -- | Specialize instance pragma (no phase selection is allowed) in a type -- class instance mkInstanceSpecializePragma :: Type -> InstBodyDecl -- | An associated data type implemented using GADT style int a type class -- instance mkInstanceDataFamilyGADTDef :: DataOrNewtypeKeyword -> InstanceRule -> Maybe KindConstraint -> [GadtConDecl] -> [Deriving] -> InstBodyDecl -- | An associated data type implementation ( data A X = C1 | C2 ) -- int a type class instance mkInstanceDataFamilyDef :: DataOrNewtypeKeyword -> InstanceRule -> [ConDecl] -> [Deriving] -> InstBodyDecl -- | An associated type definition ( type A X = B ) in a type -- class instance mkInstanceTypeFamilyDef :: TypeEqn -> InstBodyDecl -- | Type signature in instance definition with InstanceSigs mkInstanceTypeSig :: TypeSignature -> InstBodyDecl -- | A normal declaration ( f x = 12 ) in a type class instance mkInstanceBind :: ValueBind -> InstBodyDecl -- | Instance body is the implementation of the class functions ( where -- a x = 1; b x = 2 ) mkInstanceBody :: [InstBodyDecl] -> InstBody -- | Application to one more type as a part of the instance declaration mkAppInstanceHead :: InstanceHead -> Type -> InstanceHead -- | Parenthesized instance head as a part of the instance declaration mkParenInstanceHead :: InstanceHead -> InstanceHead -- | Infix application of the type/class name to the left operand as a part -- of the instance declaration mkInfixInstanceHead :: Type -> Operator -> InstanceHead -- | Type or class name as a part of the instance declaration mkInstanceHead :: Name -> InstanceHead -- | The instance declaration rule, which is, roughly, the part of the -- instance declaration before the where keyword. mkInstanceRule :: Maybe Context -> InstanceHead -> InstanceRule -- | Creates a type class instance declaration ( instance X T [where f -- = ...] ) mkInstanceDecl :: Maybe OverlapPragma -> InstanceRule -> Maybe InstBody -> Decl -- | Infix application of the type/class name to the left operand in a -- declaration head mkInfixDeclHead :: TyVar -> Operator -> TyVar -> DeclHead -- | Application in a declaration head mkDeclHeadApp :: DeclHead -> TyVar -> DeclHead -- | Parenthesized type as a declaration head mkParenDeclHead :: DeclHead -> DeclHead -- | Type or class name as a declaration head mkNameDeclHead :: Name -> DeclHead -- | Both of the minimal formulas are needed ( min1 , min2 ) mkMinimalAnd :: [MinimalFormula] -> MinimalFormula -- | One of the minimal formulas are needed ( min1 | min2 ) mkMinimalOr :: [MinimalFormula] -> MinimalFormula mkMinimalParen :: MinimalFormula -> MinimalFormula mkMinimalName :: Name -> MinimalFormula -- | Minimal pragma: {-# MINIMAL (==) | (/=) #-} in a class mkClsMinimal :: MinimalFormula -> ClassElement -- | Creates a functional dependency, given on the form l1 ... ln -> -- r1 ... rn mkFunDep :: [Name] -> [Name] -> FunDep -- | Creates a default signature (by using DefaultSignatures) in -- class: default enum :: (Generic a, GEnum (Rep a)) => [a] mkClsDefaultSig :: Name -> Type -> ClassElement -- | Creates a default choice for type synonym in class: type T x = TE -- or type instance T x = TE mkClsDefaultType :: DeclHead -> Type -> ClassElement -- | Creates an associated data synonym in class: data T y :: * mkClassElemDataFam :: DeclHead -> Maybe KindConstraint -> ClassElement -- | Creates an associated type synonym in class: type T y :: * mkClassElemTypeFam :: DeclHead -> Maybe TypeFamilySpec -> ClassElement -- | Creates a default binding as class element: f x = "aaa" mkClassElemDef :: ValueBind -> ClassElement -- | Creates a type signature as class element: f :: A -> B mkClassElemSig :: TypeSignature -> ClassElement -- | Creates the list of declarations that can appear in a typeclass mkClassBody :: [ClassElement] -> ClassBody -- | Creates a type class declaration ( class X a where f = ... ) mkClassDecl :: Maybe Context -> DeclHead -> [FunDep] -> Maybe ClassBody -> Decl -- | The newtype keyword in a type definition mkNewtypeKeyword :: DataOrNewtypeKeyword -- | The data keyword in a type definition mkDataKeyword :: DataOrNewtypeKeyword -- | Creates a deriving clause following a data type declaration. ( -- deriving Show or deriving (Show, Eq) ) mkDeriving :: [InstanceHead] -> Deriving -- | Creates a field declaration ( fld :: Int ) for a constructor mkFieldDecl :: [Name] -> Type -> FieldDecl -- | Creates an infix data constructor ( t1 :+: t2 ) mkInfixConDecl :: Type -> Operator -> Type -> ConDecl -- | Creates a record data constructor ( Point { x :: Double, y :: -- Double } ) mkRecordConDecl :: Name -> [FieldDecl] -> ConDecl -- | Creates an ordinary data constructor ( C t1 t2 ) mkConDecl :: Name -> [Type] -> ConDecl -- | Creates a GADT constructor declaration with record syntax ( D1 :: -- { val :: Int } -> T String ) mkGadtRecordConDecl :: [Name] -> [FieldDecl] -> Type -> GadtConDecl -- | Creates a GADT constructor declaration ( D1 :: Int -> T String -- ) mkGadtConDecl :: [Name] -> Type -> GadtConDecl -- | Creates a GADT-style data or newtype declaration. mkGADTDataDecl :: DataOrNewtypeKeyword -> Maybe Context -> DeclHead -> Maybe KindConstraint -> [GadtConDecl] -> [Deriving] -> Decl -- | Creates a data or newtype declaration. mkDataDecl :: DataOrNewtypeKeyword -> Maybe Context -> DeclHead -> [ConDecl] -> [Deriving] -> Decl -- | Creates a Template Haskell splice declaration ( $(generateDecls) -- ) mkSpliceDecl :: Splice -> Decl -- | Creates a function or value binding ( f x = 12 ) mkValueBinding :: ValueBind -> Decl -- | Creates type signature declaration ( f :: Int -> Int ) mkTypeSigDecl :: TypeSignature -> Decl -- | Creates default types ( default (T1, T2) ) mkDefaultDecl :: [Type] -> Decl -- | Creates a fixity declaration ( infixl 5 +, - ) mkFixityDecl :: FixitySignature -> Decl -- | Creates a standalone deriving declaration ( deriving instance X T -- ) mkStandaloneDeriving :: Maybe DeriveStrategy -> Maybe OverlapPragma -> InstanceRule -> Decl -- | Creates a type synonym ( type String = [Char] ) mkTypeDecl :: DeclHead -> Type -> Decl -- | A hole expression _ mkHole :: Expr -- | Right arrow high application: >>- mkRightHighAppl :: ArrowApp -- | Left arrow high application: -<< mkLeftHighAppl :: ArrowApp -- | Right arrow application: >- mkRightAppl :: ArrowApp -- | Left arrow application: -< mkLeftAppl :: ArrowApp -- | A do-notation in a command mkDoCmd :: [CmdStmt] -> Cmd -- | A local binding command ( let z = x+y ) mkLetCmd :: [LocalBind] -> Cmd -> Cmd -- | An if command ( if f x y then g -< x+1 else h -< y+2 ) mkIfCmd :: Expr -> Cmd -> Cmd -> Cmd -- | A pattern match command mkCaseCmd :: Expr -> [CmdAlt] -> Cmd -- | A parenthesized command mkParenCmd :: Cmd -> Cmd -- | A lambda command mkLambdaCmd :: [Pattern] -> Cmd -> Cmd -- | An infix command application mkInfixCmd :: Cmd -> Name -> Cmd -> Cmd -- | A function application command mkAppCmd :: Cmd -> Expr -> Cmd -- | A form command ( (|untilA (increment -< x+y) (within 0.5 -< -- x)|) ) mkArrowFromCmd :: Expr -> [Cmd] -> Cmd -- | An arrow application command ( f -< x + 1 ) mkArrowAppCmd :: Expr -> ArrowApp -> Expr -> Cmd -- | Create a in-AST source ranges (for generated pragmas) mkSourceRange :: String -> Integer -> Integer -> Integer -> Integer -> SourceRange -- | Creates a pragma that describes if an expression was generated from a -- code fragment by an external tool ( {-# GENERATED "Happy.y" -- 1:15-1:25 #-} ) mkGeneratedPragma :: SourceRange -> ExprPragma -- | Creates an SCC pragma for defining cost centers for profiling mkSccPragma :: String -> ExprPragma -- | Creates a CORE pragma for adding notes to expressions. mkCorePragma :: String -> ExprPragma -- | Creates a guarded right-hand side of pattern matches binding ( | x -- > 3 -> 2 ) mkGuardedCaseRhs :: [RhsGuard] -> Expr -> GuardedCaseRhs -- | Create a guarded right-hand sides of a pattern match ( | x == 1 -- -> 3; | otherwise -> 4 ) mkGuardedCaseRhss :: [GuardedCaseRhs] -> CaseRhs -- | Create a unguarded right-hand side a pattern match ( -> 3 -- ) mkCaseRhs :: Expr -> CaseRhs -- | Create a clause of case expression ( Just x -> x + 1 ) mkAlt :: Pattern -> CaseRhs -> Maybe LocalBinds -> Alt -- | Create a update the fields of the bounded names to their values ( -- .. ). Must be the last initializer. Cannot be used in a record -- update expression. mkFieldWildcard :: FieldUpdate -- | Create a update the field to the value of the same name ( x ) mkFieldPun :: Name -> FieldUpdate -- | Create a update of a field ( x = 1 ) mkFieldUpdate :: Name -> Expr -> FieldUpdate -- | Create a static pointer expression ( static e ). The inner -- expression must be closed (cannot have variables bound outside) mkStaticPointer :: Expr -> Expr -- | Create a lambda case ( case 0 -> 1; 1 -> 2 ) mkLambdaCase :: [Alt] -> Expr -- | Create a arrow definition: proc a -> f -< a+1 mkArrowApp :: Expr -> ArrowApp -> Expr -> Expr -- | Create a arrow definition: proc a -> f -< a+1 mkProcExpr :: Pattern -> Cmd -> Expr -- | Creates a pragma that marks an expression. mkExprPragma :: ExprPragma -> Expr -> Expr -- | Create a template haskell quasi quote expression, for example: -- [quoter| a + b ] mkQuasiQuoteExpr :: QuasiQuote -> Expr -- | Create a template haskell splice expression, for example: $(gen -- a) or $x mkSpliceExpr :: Splice -> Expr -- | Create a template haskell bracket expression mkBracketExpr :: Bracket -> Expr -- | ''T for template haskell reifying of types mkTypeQuote :: Name -> Expr -- | 'x for template haskell reifying of expressions mkVarQuote :: Name -> Expr -- | Create a explicit type application ( show @Integer (read "5") -- ) mkExplicitTypeApp :: Expr -> Type -> Expr -- | Create a explicit type signature ( x :: Int ) mkExprTypeSig :: Expr -> Type -> Expr -- | Create a parallel array comprehensions [: (x, y) | x <- xs , y -- <- ys :] enabled by ParallelArrays mkParArrayComp :: Expr -> [ListCompBody] -> Expr -- | Create a list comprehension ( [ (x, y) | x <- xs | y <- ys ] -- ) mkListComp :: Expr -> [ListCompBody] -> Expr -- | Create a parallel array enumeration ( [: 1,3 .. 10 :] ) mkParArrayEnum :: Expr -> Maybe Expr -> Expr -> Expr -- | Create a enumeration expression ( [1,3..10] ) mkEnum :: Expr -> Maybe Expr -> Maybe Expr -> Expr -- | Create a record value update: p1 { x = 3, y = -2 } mkRecUpdate :: Expr -> [FieldUpdate] -> Expr -- | Create a record value construction: Point { x = 3, y = -2 } mkRecCon :: Name -> [FieldUpdate] -> Expr -- | Create a right operator section: (+1) mkRightSection :: Operator -> Expr -> Expr -- | Create a left operator section: (1+) mkLeftSection :: Expr -> Operator -> Expr -- | Create a parenthesized expression: ( a + b ) mkParen :: Expr -> Expr -- | Create a parallel array expression: [: 1,2,3 :] mkParArray :: [Expr] -> Expr -- | Create a list expression: [1,2,3] mkList :: [Expr] -> Expr -- | Create a unboxed tuple section, enabled with TupleSections -- ( (#a,,b#) ). One of the elements must be missing. mkTupleUnboxedSection :: [Maybe Expr] -> Expr -- | Create a tuple section, enabled with TupleSections ( -- (a,,b) ). One of the elements must be missing. mkTupleSection :: [Maybe Expr] -> Expr -- | Create a unboxed tuple expression ( (# e1, e2, e3 #) ) mkUnboxedTuple :: [Expr] -> Expr -- | Create a tuple expression ( (e1, e2, e3) ) mkTuple :: [Expr] -> Expr -- | Create a mdo-notation expressions ( mdo x <- act1; act2 ) mkMDoBlock :: [Stmt] -> Expr -- | Create a do-notation expressions ( do x <- act1; act2 ) mkDoBlock :: [Stmt] -> Expr -- | Create a pattern matching expression ( case expr of pat1 -> -- expr1; pat2 -> expr2 ) mkCase :: Expr -> [Alt] -> Expr -- | Create a multi way if expressions with MultiWayIf extension -- ( if | guard1 -> expr1; guard2 -> expr2 ) mkMultiIf :: [GuardedCaseRhs] -> Expr -- | Create a if expression ( if a then b else c ) mkIf :: Expr -> Expr -> Expr -> Expr -- | Create a local binding ( let x = 2; y = 3 in e x y ) mkLet :: [LocalBind] -> Expr -> Expr -- | Create a lambda expression ( \a b -> a + b ) mkLambda :: [Pattern] -> Expr -> Expr -- | Create a function application expression ( f 4 ) mkApp :: Expr -> Expr -> Expr -- | Create a prefix operator application expression ( -x ) mkPrefixApp :: Operator -> Expr -> Expr -- | Create a infix operator application expression ( a + b ) mkInfixApp :: Expr -> Operator -> Expr -> Expr -- | Create a literal expression ( 42 ) mkLit :: Literal -> Expr -- | Create a expression for a variable or a data constructor ( a -- ) mkVar :: Name -> Expr -- | Creates a list of assertions ( (Eq a, Show a) ) mkTupleAssertion :: [Assertion] -> Assertion -- | Creates an assertion for implicit parameter binding ( ?cmp :: a -- -> a -> Bool ) mkImplicitAssert :: Name -> Type -> Assertion -- | Infix class assertion, also contains type equations ( a ~ X y -- ) mkInfixAssert :: Type -> Operator -> Type -> Assertion -- | Class assertion (Cls x) mkClassAssert :: Name -> [Type] -> Assertion -- | Creates a context of assertions ( C a => ... ) mkContext :: Assertion -> Context -- | Kind of the unit value (). mkPromotedUnitType :: Type -- | A tuple of elements as a kind. mkPromotedTupleType :: [Type] -> Type -- | A list of elements as a kind. mkPromotedListType :: [Type] -> Type -- | A data constructor value promoted to the kind level. mkPromotedConType :: Name -> Type -- | String value promoted to the kind level. mkPromotedStringType :: String -> Type -- | Numeric value promoted to the kind level. mkPromotedIntType :: Integer -> Type -- | A Template Haskell quasi-quote type ( [quoter| ... ] ). mkQuasiQuoteType :: QuasiQuote -> Type -- | A Template Haskell splice type ( $(genType) ). mkSpliceType :: Splice -> Type -- | A named wildcard type ( _t ) with -- -XPartialTypeSignatures mkNamedWildcardType :: Name -> Type -- | A wildcard type ( _ ) with -XPartialTypeSignatures mkWildcardType :: Type -- | Strict type marked with UNPACK pragma. (Usually contains the bang -- mark.) mkNoUnpackType :: Type -> Type -- | Strict type marked with UNPACK pragma. (Usually contains the bang -- mark.) mkUnpackType :: Type -> Type -- | Lazy type marked with ~. (Should only be used if -- Strict or StrictData language extension is used) mkLazyType :: Type -> Type -- | Strict type marked with !. mkBangType :: Type -> Type -- | Type with explicit kind signature ( a :: * ) mkKindedType :: Type -> Kind -> Type -- | Type variable or constructor ( a ) mkVarType :: Name -> Type -- | Creates a type variable with kind specification ( t :: * ) mkKindedTypeVar :: Name -> Kind -> TyVar -- | Creates a simple type variable mkTypeVar :: Name -> TyVar -- | Type surrounded by parentheses ( (T a) ) mkParenType :: Type -> Type -- | Infix type constructor ( (a <: b) ) mkInfixTypeApp :: Type -> Operator -> Type -> Type -- | Type application ( F a ) mkTypeApp :: Type -> Type -> Type -- | Parallel array type ( [:a:] ) mkParArrayType :: Type -> Type -- | List type with special syntax ( [a] ) mkListType :: Type -> Type -- | Unboxed tuple types ( (#a,b#) ) mkUnboxedTupleType :: [Type] -> Type -- | Tuple types ( (a,b) ) mkTupleType :: [Type] -> Type -- | Function types ( a -> b ) mkFunctionType :: Type -> Type -> Type -- | Type with a context ( forall x y . type ) mkCtxType :: Context -> Type -> Type -- | Simplified creation of type variables mkTypeVar' :: Name -> TyVar -- | Forall types ( forall x y . type ) mkForallType :: [TyVar] -> Type -> Type -- | Kind of the unit value (). mkUnitKind :: Kind -- | A tuple of elements as a kind. mkTupleKind :: [Kind] -> Kind -- | A list of elements as a kind. mkListKind :: [Kind] -> Kind -- | A data constructor value promoted to the kind level. mkConKind :: Name -> Kind -- | String value promoted to the kind level. mkStringKind :: String -> Kind -- | Numeric value promoted to the kind level. mkIntKind :: Integer -> Kind -- | A list kind ( [k] ) mkKindList :: Kind -> Kind -- | Kind application ( k1 k2 ) mkKindApp :: Kind -> Kind -> Kind -- | Kind variable (using PolyKinds extension) mkKindVar :: Name -> Kind -- | A parenthesised kind mkKindParen :: Kind -> Kind -- | ->, the kind of type constructor mkKindFun :: Kind -> Kind -> Kind -- | #, the kind of unboxed types mkKindUnbox :: Kind -- | *, the kind of types mkKindStar :: Kind -- | Kind constraint ( :: * -> * ) mkKindConstraint :: Kind -> KindConstraint -- | Primitive string literal (of type Addr#): "xxx"# mkPrimStringLit :: String -> Literal -- | Primitive character literal (of type Char#): -- c# mkPrimCharLit :: Char -> Literal -- | Primitive double literal (of type Double#): 3.14## mkPrimDoubleLit :: Rational -> Literal -- | Primitive float literal (of type Float#): 3.14# mkPrimFloatLit :: Rational -> Literal -- | Primitive word literal (of type Word#): 32## mkPrimWordLit :: Integer -> Literal -- | Primitive integer literal (of type Int#): 32# mkPrimIntLit :: Integer -> Literal -- | Fractional literal: 3.14 mkFracLit :: Rational -> Literal -- | Integer literal: 12 mkIntLit :: Integer -> Literal -- | String literal: "abc" mkStringLit :: String -> Literal -- | Character literal: c mkCharLit :: Char -> Literal -- | A deprecated pragma attached to the module mkModuleDeprecatedPragma :: [String] -> ModulePragma -- | A warning pragma attached to the module mkModuleWarningPragma :: [String] -> ModulePragma -- | OPTIONS pragma, possibly qualified with a tool, e.g. -- OPTIONS_GHC mkOptionsGHC :: String -> FilePragma -- | LANGUAGE pragma, listing the enabled language extensions in -- that file mkLanguagePragma :: [String] -> FilePragma mkFilePragmas :: [FilePragma] -> FilePragmaList -- | The name of a module mkModuleName :: String -> ModuleName -- | Restrict the import definition to DONT import the listed names mkImportHidingList :: [IESpec] -> ImportSpec -- | Restrict the import definition to ONLY import the listed names mkImportSpecList :: [IESpec] -> ImportSpec -- | An import declaration: import Module.Name mkImportDecl :: Bool -> Bool -> Bool -> Maybe String -> ModuleName -> Maybe ModuleName -> Maybe ImportSpec -> ImportDecl -- | (..): a class exported with all of its methods, or a datatype -- exported with all of its constructors. mkSubAll :: SubSpec -- | (a,b,c): a class exported with some of its methods, or a -- datatype exported with some of its constructors. mkSubList :: [Name] -> SubSpec -- | Marks a pattern synonym to be imported or exported mkPatternIESpec :: Name -> IESpec -- | Marks a name to be imported or exported with related names -- (subspecifier) mkIESpec :: Name -> Maybe SubSpec -> IESpec -- | The export of an imported module ( module A ) mkModuleExport :: ModuleName -> ExportSpec -- | Export a name and related names mkExportSpec :: IESpec -> ExportSpec -- | A list of export specifications surrounded by parentheses mkExportSpecs :: [ExportSpec] -> ExportSpecs -- | Module declaration with name and (optional) exports mkModuleHead :: ModuleName -> Maybe ModulePragma -> Maybe ExportSpecs -> ModuleHead -- | The representation of a haskell module, that is a separate compilation -- unit. It may or may not have a header. mkModule :: [FilePragma] -> Maybe ModuleHead -> [ImportDecl] -> [Decl] -> Module -- | Creates a quoted text mkStringNode :: String -> StringNode -- | Creates a simple (unqualified) name mkSimpleName :: String -> QualifiedName -- | Creates a simple (unqualified) name mkSimpleName' :: Name -> QualifiedName -- | Creates a part of a qualified name. mkNamePart :: String -> NamePart mkQualifiedName :: [String] -> String -> QualifiedName -- | Creates an annotated qualified simple name mkQualifiedName' :: [String] -> Name -> QualifiedName -- | Creates an implicit name: ?var mkImplicitName :: QualifiedName -> Name -- | Creates a parenthesized name: foldl (+) 0 mkParenName :: QualifiedName -> Name mkNormalName :: QualifiedName -> Name -- | Creates an annotated unqualified (non-operator) binding name: -- f or (+) mkUnqualName' :: Name -> Name -- | Creates an annotated qualified (non-operator) binding name: -- A.B.f or (A.B.+) mkQualName' :: [String] -> Name -> Name mkUnqualOp :: String -> Operator -- | Creates an annotated unqualified operator: + or -- `mod`. mkUnqualOp' :: Name -> Operator -- | Creates an annotated qualified operator: A.B.+ or -- `A.B.mod`. mkQualOp' :: [String] -> Name -> Operator mkBacktickOp :: [String] -> String -> Operator mkQualOp :: [String] -> String -> Operator -- | Creates a simple, unqualified name mkName :: String -> Name -- | Wildcard field pattern ( .. ) mkFieldWildcardPattern :: PatternField -- | Named field pun ( p ) mkFieldPunPattern :: Name -> PatternField -- | Named field pattern ( p = Point 3 2 ) mkPatternField :: Name -> Pattern -> PatternField -- | Quasi-quoted patterns: [| 1 + 2 |] mkQuasiQuotePat :: QuasiQuote -> Pattern -- | Splice patterns: $(generateX inp) mkSplicePat :: Splice -> Pattern -- | View pattern ( f -> Just 1 ) mkViewPat :: Expr -> Pattern -> Pattern -- | Pattern with explicit type signature ( x :: Int ) mkTypeSigPat :: Pattern -> Type -> Pattern -- | Bang pattern ( !x ) mkBangPat :: Pattern -> Pattern -- | Irrefutable pattern ( ~(x:_) ) mkIrrefutablePat :: Pattern -> Pattern -- | Wildcard pattern: ( _ ) mkWildPat :: Pattern -- | As-pattern (explicit name binding) ( ls@(hd:_) ) mkAsPat :: Name -> Pattern -> Pattern -- | Record pattern ( Point { x = 3, y } ) mkRecPat :: Name -> [PatternField] -> Pattern -- | Parenthesised patterns mkParenPat :: Pattern -> Pattern -- | Parallel array pattern ( [:1,2,a,x:] ) mkParArrayPat :: [Pattern] -> Pattern -- | List pattern ( [1,2,a,x] ) mkListPat :: [Pattern] -> Pattern -- | Unboxed tuple pattern ( (# x, y #) ) mkUnboxTuplePat :: [Pattern] -> Pattern -- | Tuple pattern ( (x,y) ) mkTuplePat :: [Pattern] -> Pattern -- | Constructor application pattern ( Point x y ) mkAppPat :: Name -> [Pattern] -> Pattern -- | Infix constructor application pattern ( a :+: b ) mkInfixAppPat :: Pattern -> Operator -> Pattern -> Pattern -- | Literal pattern mkLitPat :: Literal -> Pattern -- | Pattern name binding mkVarPat :: Name -> Pattern -- | Creates a recursive binding command with ( rec b <- f a c; c -- <- f b a ) mkRecCmd :: [CmdStmt] -> CmdStmt -- | Creates a let command ( let x = 3; y = 4 ) mkLetStmtCmd :: [LocalBind] -> CmdStmt -- | Creates a non-binding command ( action ) mkExprCmd :: Cmd -> CmdStmt -- | Creates a binding command ( x <- action ) mkBindCmd :: Pattern -> Cmd -> CmdStmt -- | Grouping statements by TransformListComp ( then group by -- (x + y) using groupWith ) mkGroupStmt :: Maybe Expr -> Maybe Expr -> CompStmt -- | Then statements by TransformListComp ( then sortWith by -- (x + y) ) mkThenStmt :: Expr -> Maybe Expr -> CompStmt -- | Normal monadic statement of a list comprehension mkCompStmt :: Stmt -> CompStmt -- | Body of a list comprehension: ( | x <- [1..10] ) mkListCompBody :: [CompStmt] -> ListCompBody -- | Creates a recursive binding statement with ( rec b <- f a c; c -- <- f b a ) mkRecStmt :: [Stmt] -> Stmt -- | Creates a let statement ( let x = 3; y = 4 ) mkLetStmt :: [LocalBind] -> Stmt -- | Creates a non-binding statement ( action ) mkExprStmt :: Expr -> Stmt -- | Creates a binding statement ( x <- action ) mkBindStmt :: Pattern -> Expr -> Stmt -- | Declaration bracket ( [d| f :: Int -> Int; f x = x*x |] ) mkDeclsBracket :: [Decl] -> Bracket -- | Type bracket ( [t| (Int,Int) |] ) mkTypeBracket :: Type -> Bracket -- | Pattern bracket ( [p| Point x y |] ) mkPatternBracket :: Pattern -> Bracket -- | Expression bracket ( [| x + y |] ) mkExprBracket :: Expr -> Bracket -- | Template haskell quasi-quotation: [quoter|str] mkQuasiQuote :: Name -> String -> QuasiQuote -- | A splice with parentheses: $(generate input) mkParenSplice :: Expr -> Splice -- | A simple name splice: $generateX mkIdSplice :: Name -> Splice type AnnList (node :: * -> * -> *) = AnnListG node IdDom SrcTemplateStage type AnnMaybe (node :: * -> * -> *) = AnnMaybeG node IdDom SrcTemplateStage -- | The representation of a haskell module, that is a separate compilation -- unit. It may or may not have a header. type Module = Ann UModule IdDom SrcTemplateStage -- | Module declaration with name and (optional) exports type ModuleHead = Ann UModuleHead IdDom SrcTemplateStage -- | A list of export specifications surrounded by parentheses type ExportSpecs = Ann UExportSpecs IdDom SrcTemplateStage -- | Export specifier type ExportSpec = Ann UExportSpec IdDom SrcTemplateStage -- | Marks a name to be imported or exported with related names -- (subspecifier) type IESpec = Ann UIESpec IdDom SrcTemplateStage -- | Specifies the imported element type ImportModifier = Ann UImportModifier IdDom SrcTemplateStage -- | Marks how related names will be imported or exported with a given name type SubSpec = Ann USubSpec IdDom SrcTemplateStage -- | Pragmas that must be used after the module head type ModulePragma = Ann UModulePragma IdDom SrcTemplateStage -- | Pragmas that must be used before defining the module type FilePragma = Ann UFilePragma IdDom SrcTemplateStage -- | An import declaration: import Module.Name type ImportDecl = Ann UImportDecl IdDom SrcTemplateStage -- | Restriction on the imported names type ImportSpec = Ann UImportSpec IdDom SrcTemplateStage -- | Marks the import as qualified: qualified type ImportQualified = Ann UImportQualified IdDom SrcTemplateStage -- | Marks the import as source: {-# SOURCE #-} type ImportSource = Ann UImportSource IdDom SrcTemplateStage -- | Marks the import as safe: safe type ImportSafe = Ann UImportSafe IdDom SrcTemplateStage -- | Marks an imported name to belong to the type namespace: type type TypeNamespace = Ann UTypeNamespace IdDom SrcTemplateStage -- | Renaming imports ( as A ) type ImportRenaming = Ann UImportRenaming IdDom SrcTemplateStage -- | The name of a module type ModuleName = Ann UModuleName IdDom SrcTemplateStage -- | The name of the enabled language extension, for example ( -- LambdaCase ) type LanguageExtension = Ann ULanguageExtension IdDom SrcTemplateStage -- | Haskell declaration type Decl = Ann UDecl IdDom SrcTemplateStage -- | The list of declarations that can appear in a typeclass type ClassBody = Ann UClassBody IdDom SrcTemplateStage -- | Members of a class declaration type ClassElement = Ann UClassElement IdDom SrcTemplateStage type DeclHead = Ann UDeclHead IdDom SrcTemplateStage -- | Instance body is the implementation of the class functions ( where -- a x = 1; b x = 2 ) type InstBody = Ann UInstBody IdDom SrcTemplateStage -- | Declarations inside an instance declaration. type InstBodyDecl = Ann UInstBodyDecl IdDom SrcTemplateStage -- | GADT constructor declaration ( D1 :: { val :: Int } -> T String -- ) type GadtConDecl = Ann UGadtConDecl IdDom SrcTemplateStage -- | Type of GADT constructors (can be record types: { val :: Int -- }) type GadtConType = Ann UGadtConType IdDom SrcTemplateStage -- | Marker for a field wildcard. Only needed to attach semantic -- information in a type-safe way. type FieldWildcard = Ann UFieldWildcard IdDom SrcTemplateStage -- | A list of functional dependencies: | a -> b, c -> d -- separated by commas type FunDeps = Ann UFunDeps IdDom SrcTemplateStage -- | A functional dependency, given on the form l1 ... ln -> r1 ... -- rn type FunDep = Ann UFunDep IdDom SrcTemplateStage -- | A constructor declaration for a datatype type ConDecl = Ann UConDecl IdDom SrcTemplateStage -- | The data or the newtype keyword to define ADTs. type DataOrNewtypeKeyword = Ann UDataOrNewtypeKeyword IdDom SrcTemplateStage -- | Field declaration ( fld :: Int ) type FieldDecl = Ann UFieldDecl IdDom SrcTemplateStage -- | A deriving clause following a data type declaration. ( deriving -- Show or deriving (Show, Eq) ) type Deriving = Ann UDeriving IdDom SrcTemplateStage -- | A deriving strategy (stock, newtype or -- anyclass) type DeriveStrategy = Ann UDeriveStrategy IdDom SrcTemplateStage -- | The instance declaration rule, which is, roughly, the part of the -- instance declaration before the where keyword. type InstanceRule = Ann UInstanceRule IdDom SrcTemplateStage -- | The specification of the class instance declaration type InstanceHead = Ann UInstanceHead IdDom SrcTemplateStage -- | Specialize pragma ( {--} ) type SpecializePragma = Ann USpecializePragma IdDom SrcTemplateStage -- | Overlap pragmas. Can be applied to class declarations and class -- instance declarations. type OverlapPragma = Ann UOverlapPragma IdDom SrcTemplateStage -- | Type equations as found in closed type families ( T A = S ) type TypeEqn = Ann UTypeEqn IdDom SrcTemplateStage -- | Top level pragmas type TopLevelPragma = Ann UTopLevelPragma IdDom SrcTemplateStage -- | A rewrite rule ( "map/map" forall f g xs. map f (map g xs) = map -- (f.g) xs ) type Rule = Ann URule IdDom SrcTemplateStage -- | A variable for a rewrite rule. With or without type signature. type RuleVar = Ann URuleVar IdDom SrcTemplateStage -- | Annotation allows you to connect an expression to any declaration. type AnnotationSubject = Ann UAnnotationSubject IdDom SrcTemplateStage -- | Formulas of minimal annotations declaring which functions should be -- defined. type MinimalFormula = Ann UMinimalFormula IdDom SrcTemplateStage -- | In-AST source ranges (for generated pragmas) type SourceRange = Ann USourceRange IdDom SrcTemplateStage -- | Open type and data families type TypeFamily = Ann UTypeFamily IdDom SrcTemplateStage -- | Type family specification with kinds specification and injectivity. type TypeFamilySpec = Ann UTypeFamilySpec IdDom SrcTemplateStage -- | Injectivity annotation for type families ( = r | r -> a ) type InjectivityAnn = Ann UInjectivityAnn IdDom SrcTemplateStage -- | Pattern synonyms: pattern Arrow t1 t2 = App "->" [t1, t2] -- type PatternSynonym = Ann UPatternSynonym IdDom SrcTemplateStage -- | Right-hand side of pattern synonym type PatSynRhs = Ann UPatSynRhs IdDom SrcTemplateStage -- | Left hand side of a pattern synonym type PatSynLhs = Ann UPatSynLhs IdDom SrcTemplateStage -- | Where clause of pattern synonym (explicit expression direction) type PatSynWhere = Ann UPatSynWhere IdDom SrcTemplateStage -- | Pattern type signature declaration ( pattern Succ :: Int -> Int -- ) type PatternSignature = Ann UPatternTypeSignature IdDom SrcTemplateStage -- | Role annotations for types type Role = Ann URole IdDom SrcTemplateStage -- | Call conventions of foreign functions type CallConv = Ann UCallConv IdDom SrcTemplateStage -- | Safety annotations for foreign calls type Safety = Ann USafety IdDom SrcTemplateStage -- | A CONLIKE modifier for an INLINE pragma. type ConlikeAnnot = Ann UConlikeAnnot IdDom SrcTemplateStage -- | Controls the activation of a rewrite rule ( [1] ) type PhaseControl = Ann UPhaseControl IdDom SrcTemplateStage -- | Value binding for top-level and local bindings type ValueBind = Ann UValueBind IdDom SrcTemplateStage -- | Clause of function binding type Match = Ann UMatch IdDom SrcTemplateStage -- | Something on the left side of the match type MatchLhs = Ann UMatchLhs IdDom SrcTemplateStage -- | Right hand side of a value binding (possible with guards): ( = 3 -- or | x == 1 = 3; | otherwise = 4 ) type Rhs = Ann URhs IdDom SrcTemplateStage -- | A guarded right-hand side of a value binding ( | x > 3 = 2 -- ) type GuardedRhs = Ann UGuardedRhs IdDom SrcTemplateStage -- | Guards for value bindings and pattern matches ( Just v x, v -- 1 ) type RhsGuard = Ann URhsGuard IdDom SrcTemplateStage -- | Bindings that are enabled in local blocks (where or let). type LocalBind = Ann ULocalBind IdDom SrcTemplateStage -- | Local bindings attached to a declaration ( where x = 42 ) type LocalBinds = Ann ULocalBinds IdDom SrcTemplateStage -- | A fixity signature ( infixl 5 +, - ). type FixitySignature = Ann UFixitySignature IdDom SrcTemplateStage -- | A type signature ( f :: Int -> Int ) type TypeSignature = Ann UTypeSignature IdDom SrcTemplateStage -- | Haskell types type Type = Ann UType IdDom SrcTemplateStage -- | Type variable declarations (with possible kind annotation) type TyVar = Ann UTyVar IdDom SrcTemplateStage type Context = Ann UContext IdDom SrcTemplateStage -- | A single assertion in the context type Assertion = Ann UAssertion IdDom SrcTemplateStage -- | Kind constraint ( :: * -> * ) type KindConstraint = Ann UKindConstraint IdDom SrcTemplateStage -- | Haskell kinds type Kind = Ann UKind IdDom SrcTemplateStage -- | Values promoted to the kind level type PromotedKind = Ann UPromoted UKind IdDom SrcTemplateStage -- | Haskell expressions type Expr = Ann UExpr IdDom SrcTemplateStage -- | Clause of case expression ( Just x -> x + 1 ) type Alt = Ann UAlt IdDom SrcTemplateStage -- | Right hand side of a match (possible with guards): ( -> 3 -- or | x == 1 -> 3; | otherwise -> 4 ) type CaseRhs = Ann UCaseRhs IdDom SrcTemplateStage -- | A guarded right-hand side of pattern matches binding ( | x > 3 -- -> 2 ) type GuardedCaseRhs = Ann UGuardedCaseRhs IdDom SrcTemplateStage -- | Field update expressions type FieldUpdate = Ann UFieldUpdate IdDom SrcTemplateStage -- | An element of a tuple section that can be an expression or missing -- (indicating a value from a parameter) type TupSecElem = Ann UTupSecElem IdDom SrcTemplateStage -- | Pragmas that can be applied to expressions type ExprPragma = Ann UExprPragma IdDom SrcTemplateStage -- | Special expressions for arrows type Cmd = Ann UCmd IdDom SrcTemplateStage -- | Clause of case expression for commands type CmdAlt = Ann UCmdAlt IdDom SrcTemplateStage -- | Arrow directions type ArrowApp = Ann UArrowAppl IdDom SrcTemplateStage -- | A statement in a do-notation type Stmt = Ann UStmt IdDom SrcTemplateStage -- | Keywords do or mdo to start a do-block type DoKind = Ann UDoKind IdDom SrcTemplateStage -- | List comprehension statement type CompStmt = Ann UCompStmt IdDom SrcTemplateStage -- | Body of a list comprehension: ( | x <- [1..10] ) type ListCompBody = Ann UListCompBody IdDom SrcTemplateStage -- | A do-notation for arrows type CmdStmt = Ann UCmdStmt IdDom SrcTemplateStage -- | Representation of patterns for pattern bindings type Pattern = Ann UPattern IdDom SrcTemplateStage type PatternField = Ann UPatternField IdDom SrcTemplateStage -- | A template haskell splice type Splice = Ann USplice IdDom SrcTemplateStage -- | Template Haskell bracket expressions type Bracket = Ann UBracket IdDom SrcTemplateStage -- | Template haskell quasi-quotation: [quoter|str] type QuasiQuote = Ann UQuasiQuote IdDom SrcTemplateStage -- | Haskell literals type Literal = Ann ULiteral IdDom SrcTemplateStage -- | A definition that functions as an operator type Operator = Ann UOperator IdDom SrcTemplateStage -- | A definition that functions as a name type Name = Ann UName IdDom SrcTemplateStage -- | Possible qualified names. Contains also implicit names. Linear -- implicit parameter: %x. Non-linear implicit parameter: -- ?x. type QualifiedName = Ann UQualifiedName IdDom SrcTemplateStage -- | Parts of a qualified name. type NamePart = Ann UNamePart IdDom SrcTemplateStage -- | Program elements formatted as string literals (import packages, pragma -- texts) type StringNode = Ann UStringNode IdDom SrcTemplateStage type MaybeContext = AnnMaybe UContext type MaybeDeriving = AnnMaybe UDeriving type MaybeDeriveStrategy = AnnMaybe UDeriveStrategy type MaybeLocalBinds = AnnMaybe ULocalBinds type MaybeTypeFamilySpec = AnnMaybe UTypeFamilySpec type MaybeKindConstraint = AnnMaybe UKindConstraint type MaybeClassBody = AnnMaybe UClassBody type MaybeInstBody = AnnMaybe UInstBody type MaybeExpr = AnnMaybe UExpr type MaybeExportSpecs = AnnMaybe UExportSpecs type MaybeImportQualified = AnnMaybe UImportQualified type MaybeImportSource = AnnMaybe UImportSource type MaybeImportSafe = AnnMaybe UImportSafe type MaybeImportSpec = AnnMaybe UImportSpec type MaybeModuleHead = AnnMaybe UModuleHead type MaybeImportModifier = AnnMaybe UImportModifier type MaybeModulePragma = AnnMaybe UModulePragma type MaybeSubSpec = AnnMaybe USubSpec type MaybeStringNode = AnnMaybe UStringNode type MaybeImportRenaming = AnnMaybe UImportRenaming type MaybeSafety = AnnMaybe USafety type MaybePhaseControl = AnnMaybe UPhaseControl type MaybeConlikeAnnot = AnnMaybe UConlikeAnnot type MaybeFunDeps = AnnMaybe UFunDeps type MatchList = AnnList UMatch type DeclList = AnnList UDecl type PatternList = AnnList UPattern type OperatorList = AnnList UOperator type NameList = AnnList UName type LocalBindList = AnnList ULocalBind type IESpecList = AnnList UIESpec type RhsGuardList = AnnList URhsGuard type GuardedRhsList = AnnList UGuardedRhs type GuardedCaseRhsList = AnnList UGuardedCaseRhs type ConDeclList = AnnList UConDecl type TypeEqnList = AnnList UTypeEqn type TypeList = AnnList UType type FieldDeclList = AnnList UFieldDecl type ExprList = AnnList UExpr type FieldUpdateList = AnnList UFieldUpdate type GadtConDeclList = AnnList UGadtConDecl type ClassElementList = AnnList UClassElement type InstBodyDeclList = AnnList UInstBodyDecl type InstanceHeadList = AnnList UInstanceHead type AltList = AnnList UAlt type StmtList = AnnList UStmt type KindList = AnnList UKind type TyVarList = AnnList UTyVar type ListCompBodyList = AnnList UListCompBody type ExportSpecList = AnnList UExportSpec type FilePragmaList = AnnList UFilePragma type ImportDeclList = AnnList UImportDecl type PatternFieldList = AnnList UPatternField type AssertionList = AnnList UAssertion type CompStmtList = AnnList UCompStmt type RuleList = AnnList URule type RuleVarList = AnnList URuleVar type RoleList = AnnList URole type MinimalFormulaList = AnnList UMinimalFormula type FunDepList = AnnList UFunDep type TupSecElemList = AnnList UTupSecElem type CmdList = AnnList UCmd type CmdAltList = AnnList UCmdAlt type CmdStmtList = AnnList UCmdStmt type LanguageExtensionList = AnnList ULanguageExtension type StringNodeList = AnnList UStringNode type NamePartList = AnnList UNamePart type DerivingList = AnnList UDeriving -- | Exceptions that can occur while loading modules or during internal -- operations (not during performing the refactor). data RefactorException IllegalExtensions :: [String] -> RefactorException SourceCodeProblem :: ErrorMessages -> RefactorException UnknownException :: String -> RefactorException -- | Change in the project, modification or removal of a module. data RefactorChange ContentChanged :: ModuleDom -> RefactorChange [fromContentChanged] :: RefactorChange -> ModuleDom ModuleRemoved :: String -> RefactorChange [removedModuleName] :: RefactorChange -> String ModuleCreated :: String -> UnnamedModule -> SourceFileKey -> RefactorChange [createdModuleName] :: RefactorChange -> String [createdModuleContent] :: RefactorChange -> UnnamedModule [sameLocation] :: RefactorChange -> SourceFileKey -- | Module name and marker to separate .hs-boot module definitions. -- Specifies a source file in a working directory. data SourceFileKey SourceFileKey :: FilePath -> String -> SourceFileKey [_sfkFileName] :: SourceFileKey -> FilePath [_sfkModuleName] :: SourceFileKey -> String -- | The name of the module and the AST type ModuleDom = (SourceFileKey, UnnamedModule) -- | A type for the input and result of refactoring a module type UnnamedModule = Ann UModule IdDom SrcTemplateStage -- | Transforms module name to a .hs file name relative to the source root -- directory. moduleSourceFile :: String -> FilePath -- | Transforms a source root relative file name into module name. sourceFileModule :: FilePath -> String sfkFileName :: Lens SourceFileKey SourceFileKey FilePath FilePath sfkModuleName :: Lens SourceFileKey SourceFileKey String String -- | The information a refactoring can use data RefactorCtx RefactorCtx :: Module -> Ann UModule IdDom SrcTemplateStage -> [Ann UImportDecl IdDom SrcTemplateStage] -> RefactorCtx -- | The name of the module being refactored. Used for accessing implicit -- imports. [refModuleName] :: RefactorCtx -> Module [refCtxRoot] :: RefactorCtx -> Ann UModule IdDom SrcTemplateStage [refCtxImports] :: RefactorCtx -> [Ann UImportDecl IdDom SrcTemplateStage] -- | Input and output information for the refactoring TODO: use multiple -- states instead of Either newtype LocalRefactorT m a LocalRefactorT :: WriterT [Either Name (SrcSpan, String, String)] (ReaderT RefactorCtx m) a -> LocalRefactorT m a [fromRefactorT] :: LocalRefactorT m a -> WriterT [Either Name (SrcSpan, String, String)] (ReaderT RefactorCtx m) a -- | The refactoring monad for the whole project type Refactor = ExceptT String Ghc -- | The refactoring monad for a given module type LocalRefactor = LocalRefactorT Refactor -- | The type of a refactoring that affects the whole project. type ProjectRefactoring = [ModuleDom] -> Refactor [RefactorChange] -- | The type of a refactoring type Refactoring = ModuleDom -> [ModuleDom] -> Refactor [RefactorChange] -- | A refactoring that only affects one module type LocalRefactoring = UnnamedModule -> LocalRefactor UnnamedModule -- | A monad that can be used to refactor class Monad m => RefactorMonad m refactError :: RefactorMonad m => String -> m a liftGhc :: RefactorMonad m => Ghc a -> m a -- | A type class for handling definitions that can appear as both -- top-level and local definitions class NamedElement d => BindingElem d -- | Accesses a type signature definition in a local or top-level -- definition sigBind :: BindingElem d => Simple Partial (Ann d IdDom SrcTemplateStage) TypeSignature -- | Accesses a value or function definition in a local or top-level -- definition valBind :: BindingElem d => Simple Partial (Ann d IdDom SrcTemplateStage) ValueBind -- | Accesses a type signature definition in a local or top-level -- definition fixitySig :: BindingElem d => Simple Partial (Ann d IdDom SrcTemplateStage) FixitySignature -- | Creates a new definition from a type signature createTypeSig :: BindingElem d => TypeSignature -> Ann d IdDom SrcTemplateStage -- | Creates a new definition from a value or function definition createBinding :: BindingElem d => ValueBind -> Ann d IdDom SrcTemplateStage -- | Creates a new fixity signature createFixitySig :: BindingElem d => FixitySignature -> Ann d IdDom SrcTemplateStage -- | Checks if a given definition is a type signature isTypeSig :: BindingElem d => Ann d IdDom SrcTemplateStage -> Bool -- | Checks if a given definition is a function or value binding isBinding :: BindingElem d => Ann d IdDom SrcTemplateStage -> Bool -- | Checks if a given definition is a fixity signature isFixitySig :: BindingElem d => Ann d IdDom SrcTemplateStage -> Bool getValBindInList :: BindingElem d => RealSrcSpan -> AnnList d -> Maybe ValueBind valBindsInList :: BindingElem d => Simple Traversal (AnnList d) ValueBind debugM :: (Monad m, Show a) => m a -> m a debug :: Show a => a -> a -- | Displays True iff the wrapped value is a Just debugMaybeT :: Monad m => MaybeT m a -> MaybeT m a showOutputable :: Outputable a => a -> String showName :: Name -> String showOp :: Operator -> String -- | Set the minimal indentation recursively for a part of the AST setMinimalIndent :: SourceInfoTraversal elem => Int -> elem dom SrcTemplateStage -> elem dom SrcTemplateStage -- | Filters the elements of the list. By default it removes the separator -- before the element. Of course, if the first element is removed, the -- following separator is removed as well. filterList :: SourceInfoTraversal e => (Ann e IdDom SrcTemplateStage -> Bool) -> AnnList e -> AnnList e filterListIndexed :: SourceInfoTraversal e => (Int -> Ann e IdDom SrcTemplateStage -> Bool) -> AnnList e -> AnnList e -- | A version of filterList that cares about keeping non-removable code -- elements (like preprocessor pragmas) filterListSt :: SourceInfoTraversal e => (Ann e IdDom SrcTemplateStage -> Bool) -> AnnList e -> LocalRefactor (AnnList e) -- | A version of filterListIndexed that cares about keeping non-removable -- code elements (like preprocessor pragmas) filterListIndexedSt :: SourceInfoTraversal e => (Int -> Ann e IdDom SrcTemplateStage -> Bool) -> AnnList e -> LocalRefactor (AnnList e) -- | Selects the given indices from a list sublist :: [Int] -> [a] -> [a] -- | Selects all but the given indices from a list notSublist :: [Int] -> [a] -> [a] -- | Inserts the element in the places where the two positioning functions -- (one checks the element before, one the element after) allows the -- placement. insertWhere :: Bool -> Ann e IdDom SrcTemplateStage -> (Maybe (Ann e IdDom SrcTemplateStage) -> Bool) -> (Maybe (Ann e IdDom SrcTemplateStage) -> Bool) -> AnnList e -> AnnList e -- | Checks where the element will be inserted given the two positioning -- functions. insertIndex :: (Maybe (Ann e IdDom SrcTemplateStage) -> Bool) -> (Maybe (Ann e IdDom SrcTemplateStage) -> Bool) -> [Ann e IdDom SrcTemplateStage] -> Maybe Int -- | Gets the elements and separators from a list. The first separator is -- zipped to the second element. To the first element, the "" string is -- zipped. zipWithSeparators :: AnnList e -> [(([SourceTemplateTextElem], SrcSpan), Ann e IdDom SrcTemplateStage)] replaceWithJust :: Ann e IdDom SrcTemplateStage -> AnnMaybe e -> AnnMaybe e replaceWithNothing :: AnnMaybe e -> AnnMaybe e -- | Remove the container (where or let) when the last binding is removed. removeEmptyBnds :: Simple Traversal Module ValueBind -> Simple Traversal Module Expr -> Module -> Module -- | Puts the elements in the orginal order and remove duplicates (elements -- with the same source range) normalizeElements :: [Ann e dom SrcTemplateStage] -> [Ann e dom SrcTemplateStage] -- | Groups elements together into equivalence groups. groupElemsBy :: Ord k => (a -> k) -> [a] -> [[a]] -- | Chooses a representative element for each equivalence group, and pairs -- them with their corresponding group. reprElems :: [[a]] -> [(a, [a])] -- | Sorts the elements of a list into equivalence groups based on a -- function, then chooses a representative element for each group, and -- pairs them with their corresponding group. equivalenceGroupsBy :: Ord k => (a -> k) -> [a] -> [(a, [a])] isJustT :: Monad m => MaybeT m a -> m Bool isNothingT :: Monad m => MaybeT m a -> m Bool liftMaybe :: Monad m => Maybe a -> MaybeT m a fromMaybeT :: Monad m => a -> MaybeT m a -> m a fromMaybeTM :: Monad m => m a -> MaybeT m a -> m a maybeT :: Monad m => b -> (a -> b) -> MaybeT m a -> m b maybeTM :: Monad m => m b -> (a -> m b) -> MaybeT m a -> m b -- | Performs the given refactoring, transforming it into a Ghc action runRefactor :: ModuleDom -> [ModuleDom] -> Refactoring -> Ghc (Either String [RefactorChange]) -- | Wraps a refactoring that only affects one module. Performs the -- per-module finishing touches. localRefactoring :: LocalRefactoring -> Refactoring -- | Transform the result of the local refactoring localRefactoringRes :: ((UnnamedModule -> UnnamedModule) -> a -> a) -> UnnamedModule -> LocalRefactor a -> Refactor a -- | Re-inserts the elements removed from the AST that should be kept (for -- example preprocessor directives) insertText :: SourceInfoTraversal p => [(SrcSpan, String, String)] -> p dom SrcTemplateStage -> p dom SrcTemplateStage -- | Adds the imports that bring names into scope that are needed by the -- refactoring addGeneratedImports :: [Name] -> Module -> Module registeredNamesFromPrelude :: [Name] otherNamesFromPrelude :: [String] qualifiedName :: Name -> String referenceName :: Name -> LocalRefactor (Ann UName IdDom SrcTemplateStage) referenceOperator :: Name -> LocalRefactor (Ann UOperator IdDom SrcTemplateStage) -- | Create a name that references the definition. Generates an import if -- the definition is not yet imported. referenceName' :: ([String] -> Name -> Ann nt IdDom SrcTemplateStage) -> Name -> LocalRefactor (Ann nt IdDom SrcTemplateStage) -- | Reference the name by the shortest suitable import referenceBy :: ([String] -> Name -> Ann nt IdDom SrcTemplateStage) -> Name -> [Ann UImportDecl IdDom SrcTemplateStage] -> Ann nt IdDom SrcTemplateStage data UnsupportedExtension UnsupportedExtension :: String -> UnsupportedExtension -- | The final version of our AST, with type infromation added type TypedModule = Ann UModule IdDom SrcTemplateStage -- | A quick function to try the refactorings tryRefactor :: (RealSrcSpan -> Refactoring) -> String -> ModuleName -> IO () -- | Adjust the source range to be applied to the refactored module correctRefactorSpan :: UnnamedModule -> RealSrcSpan -> RealSrcSpan -- | Set the given flags for the GHC session. Also gives back a change -- function that you can use to apply the settings to any flags. Prints -- out errors and warnings useFlags :: [String] -> Ghc ([String], DynFlags -> DynFlags) pprWarning :: Warn -> SDoc pprErr :: Err -> SDoc -- | Reloads the package database based on the session flags reloadPkgDb :: Ghc () -- | Initialize GHC flags to default values that support refactoring initGhcFlags :: Ghc () initGhcFlagsForTest :: Ghc () -- | Sets up basic flags and settings for GHC initGhcFlags' :: Bool -> Bool -> Ghc () -- | Use the given source directories when searching for imported modules useDirs :: [FilePath] -> Ghc () -- | Don't use the given source directories when searching for imported -- modules deregisterDirs :: [FilePath] -> Ghc () -- | Translates module name and working directory into the name of the file -- where the given module should be defined toFileName :: FilePath -> ModuleName -> FilePath -- | Translates module name and working directory into the name of the file -- where the boot module should be defined toBootFileName :: FilePath -> ModuleName -> FilePath -- | Get the source directory where the module is located. getSourceDir :: ModSummary -> IO FilePath -- | Gets the path to the source file of the module. getModSumOrig :: ModSummary -> FilePath keyFromMS :: ModSummary -> SourceFileKey -- | Gets the module name getModSumName :: ModSummary -> String -- | Load the AST of a module given by the working directory and module -- name. loadModuleAST :: FilePath -> ModuleName -> Ghc TypedModule -- | Load the summary of a module given by the working directory and module -- name. loadModule :: FilePath -> ModuleName -> Ghc ModSummary -- | Get the typed representation of a Haskell module. parseTyped :: ModSummary -> Ghc TypedModule trfProblem :: String -> a -- | Modifies the dynamic flags for performing a ghc task withAlteredDynFlags :: GhcMonad m => (DynFlags -> m DynFlags) -> m a -> m a -- | Forces the code generation for a given module forceCodeGen :: ModSummary -> ModSummary codeGenDfs :: DynFlags -> DynFlags -- | Forces ASM code generation for a given module forceAsmGen :: ModSummary -> ModSummary -- | Normalizes the flags for a module summary modSumNormalizeFlags :: ModSummary -> ModSummary -- | Removes all flags that are unintelligable for refactoring normalizeFlags :: DynFlags -> DynFlags -- | Read a source range from our textual format: -- line:col-line:col or line:col readSrcSpan :: String -> RealSrcSpan -- | Read a source location from our format: line:col readSrcLoc :: String -> RealSrcLoc -- | The signature and behavior of one refactoring that can be executed. data RefactoringChoice NamingRefactoring :: String -> RealSrcSpan -> String -> Refactoring -> RefactoringChoice [refactoringName] :: RefactoringChoice -> String [namingRefactoring] :: RefactoringChoice -> RealSrcSpan -> String -> Refactoring SelectionRefactoring :: String -> RealSrcSpan -> Refactoring -> RefactoringChoice [refactoringName] :: RefactoringChoice -> String [selectionRefactoring] :: RefactoringChoice -> RealSrcSpan -> Refactoring ModuleRefactoring :: String -> Refactoring -> RefactoringChoice [refactoringName] :: RefactoringChoice -> String [moduleRefactoring] :: RefactoringChoice -> Refactoring ProjectRefactoring :: String -> ProjectRefactoring -> RefactoringChoice [refactoringName] :: RefactoringChoice -> String [projectRefactoring] :: RefactoringChoice -> ProjectRefactoring -- | Executes a given command (choosen from the set of available -- refactorings) on the selected module and given other modules. performCommand :: [RefactoringChoice] -> [String] -> Either FilePath ModuleDom -> [ModuleDom] -> Ghc (Either String [RefactorChange]) -- | Gets the name of possible refactorings. refactorCommands :: [RefactoringChoice] -> [String] data Severity Error :: Severity Warning :: Severity Info :: Severity data Marker Marker :: SrcSpan -> Severity -> String -> Marker [location] :: Marker -> SrcSpan [severity] :: Marker -> Severity [message] :: Marker -> String data QueryChoice LocationQuery :: String -> RealSrcSpan -> ModuleDom -> [ModuleDom] -> QueryMonad QueryValue -> QueryChoice [queryName] :: QueryChoice -> String [locationQuery] :: QueryChoice -> RealSrcSpan -> ModuleDom -> [ModuleDom] -> QueryMonad QueryValue GlobalQuery :: String -> ModuleDom -> [ModuleDom] -> QueryMonad QueryValue -> QueryChoice [queryName] :: QueryChoice -> String [globalQuery] :: QueryChoice -> ModuleDom -> [ModuleDom] -> QueryMonad QueryValue data QueryValue GeneralQuery :: Value -> QueryValue MarkerQuery :: [Marker] -> QueryValue type QueryMonad = ExceptT String Ghc type QueryType = String decompQuery :: QueryValue -> (QueryType, Value) queryCommands :: [QueryChoice] -> [String] queryError :: String -> QueryMonad a performQuery :: [QueryChoice] -> [String] -> Either FilePath ModuleDom -> [ModuleDom] -> Ghc (Either String (QueryType, Value)) -- | Different classes of definitions that have different kind of names. data NameClass -- | Normal value definitions: functions, variables Variable :: NameClass -- | Data constructors Ctor :: NameClass -- | Functions with operator-like names ValueOperator :: NameClass -- | Constructors with operator-like names DataCtorOperator :: NameClass -- | UType definitions with operator-like names SynonymOperator :: NameClass -- | Get which category does a given name belong to classifyName :: RefactorMonad m => Name -> m NameClass -- | Checks if a given name is a valid module name validModuleName :: String -> Maybe String -- | Check if a given name is valid for a given kind of definition nameValid :: NameClass -> String -> Maybe String isIdChar :: Char -> Bool isOperatorChar :: Char -> Bool opSemName :: Operator -> Maybe Name declHeadQName :: DeclHead -> QualifiedName declHeadSemName :: DeclHead -> Maybe Name instHeadSemName :: InstanceHead -> Maybe Name -- | Collects the qualified names of the class heads in an assertion. assertionQNames :: Assertion -> [QualifiedName] -- | Collects the semantic names of the class heads in an assertion. assertionSemNames :: Assertion -> [Name] -- | Extracts the name of a type. In case of a type application, it finds -- the type being applied. It works only for unambiguous types, so it -- won't work for tuples. nameFromType :: Type -> Maybe Name typeExpr :: Expr -> Ghc Type literalType :: Literal -> Ghc Type appTypeMatches :: [ClsInst] -> Type -> [Type] -> Maybe (TCvSubst, Type) type ClosedTyFam = CoAxiom Branched hasConstraintKind :: Type -> Bool -- | Looks up the Type of an entity with an Id of any locality. If the -- entity being scrutinised is a type variable, it fails. lookupTypeFromId :: (HasIdInfo' id, GhcMonad m) => id -> MaybeT m Type -- | Looks up the Type or the Kind of an entity that has an Id. Note: In -- some cases we only get the Kind of the Id (e.g. for type constructors) typeOrKindFromId :: HasIdInfo' id => id -> Type -- | Extracts a Type from a TyThing when possible. typeFromTyThing :: TyThing -> Maybe Type -- | Looks up a GHC Type from a Haskell Tools Name (given the name is -- global) For an identifier, it returns its type. For a data -- constructor, it returns its type. For a pattern synonym, it returns -- its builder's type. For a type synonym constructor, it returns its -- right-hand side. For a coaxiom, it fails. lookupTypeFromGlobalName :: (HasNameInfo' n, GhcMonad m) => n -> MaybeT m Type -- | Looks up the right-hand side (GHC representation) of a Haskell Tools -- Name corresponding to a type synonym lookupTypeSynRhs :: (HasNameInfo' n, GhcMonad m) => n -> MaybeT m Type lookupSynDef :: TyThing -> Maybe TyCon tyconFromTyThing :: TyThing -> Maybe TyCon tyconFromGHCType :: Type -> Maybe TyCon isNewtype :: GhcMonad m => Type -> m Bool lookupType :: GhcMonad m => Type -> MaybeT m TyThing -- | Looks up a GHC.Class from something that has a type class constructor -- in it Fails if the argument does not contain a class type constructor lookupClassWith :: GhcMonad m => (a -> MaybeT m Name) -> a -> MaybeT m Class lookupClass :: (GhcMonad m, HasNameInfo' n) => n -> MaybeT m Class lookupClassFromInstance :: GhcMonad m => InstanceHead -> MaybeT m Class lookupClassFromDeclHead :: GhcMonad m => DeclHead -> MaybeT m Class -- | Looks up the right-hand side (GHC representation) of a Haskell Tools -- Type corresponding to a type synonym semanticsTypeSynRhs :: GhcMonad m => Type -> MaybeT m Type -- | Converts a global Haskell Tools type to a GHC type semanticsType :: GhcMonad m => Type -> MaybeT m Type isNewtypeTyCon :: TyThing -> Bool -- | Looks up the given name, extracts something out of it. If the -- extraction is not succesful, it returns False, if it is successful, -- then checks the result against the predicate. The reasoning behind -- this, is that the predicate can only be satisfied by a proper name. satisfies :: (HasNameInfo' n, GhcMonad m) => (TyThing -> Maybe a) -> (a -> Bool) -> n -> MaybeT m Bool -- | Decides whether a given name is a type family constructor. Fails if -- the lookup is not successful. isClassTyConNameM :: (HasNameInfo' n, GhcMonad m) => n -> MaybeT m Bool -- | Decides whether a given name is a standard Haskell98 data constructor. -- Fails if the lookup is not successful. isVanillaDataConNameM :: (HasNameInfo' n, GhcMonad m) => n -> MaybeT m Bool -- | Looks up a closed type family from a name. lookupClosedTyFam :: (HasNameInfo' n, GhcMonad m) => n -> MaybeT m ClosedTyFam -- | Extract the CoAxioms from a TyThing representing a closed type family. coAxiomFromTyThing :: TyThing -> Maybe (CoAxiom Branched) -- | Determines whether a Type itself has a type variable head. hasTyVarHead :: Type -> Bool -- | An element of the AST keeping extra information. data Ann (elem :: * -> * -> *) dom stage class HasSourceInfo e where { type family SourceInfoType e :: *; } srcInfo :: HasSourceInfo e => Simple Lens e SourceInfoType e -- | Extracts or modifies the concrete range corresponding to a given -- source info. In case of lists and optional elements, it may not -- contain the elements inside. class HasRange a getRange :: HasRange a => a -> SrcSpan setRange :: HasRange a => SrcSpan -> a -> a annListElems :: RefMonads w r => Reference w r MU MU AnnListG elem dom stage AnnListG elem dom stage [Ann elem dom stage] [Ann elem dom stage] annListAnnot :: RefMonads w r => Reference w r MU MU AnnListG elem dom stage AnnListG elem dom stage NodeInfo SemanticInfo dom AnnListG elem ListInfo stage NodeInfo SemanticInfo dom AnnListG elem ListInfo stage annList :: (RefMonads w r, MonadPlus r, Morph Maybe r, Morph [] r) => Reference w r MU MU AnnListG e d s AnnListG e d s Ann e d s Ann e d s annJust :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, Morph Maybe r) => Reference w r MU MU AnnMaybeG e d s AnnMaybeG e d s Ann e d s Ann e d s annMaybe :: RefMonads w r => Reference w r MU MU AnnMaybeG elem dom stage AnnMaybeG elem dom stage Maybe Ann elem dom stage Maybe Ann elem dom stage isAnnNothing :: () => AnnMaybeG e d s -> Bool -- | A semantic domain for the AST. The semantic domain maps semantic -- information for the different types of nodes in the AST. The kind of -- semantic domain for an AST depends on which stages of the compilation -- it passed. However after transforming the GHC representation to our -- AST, the domain stays the same. The domain is not applied to the AST -- elements that are generated while refactoring. type Domain d = (Typeable d, Data d, SemanticInfo' d SemaInfoDefaultCls ~ NoSemanticInfo, Data SemanticInfo' d SemaInfoNameCls, Data SemanticInfo' d SemaInfoLitCls, Data SemanticInfo' d SemaInfoExprCls, Data SemanticInfo' d SemaInfoImportCls, Data SemanticInfo' d SemaInfoModuleCls, Data SemanticInfo' d SemaInfoWildcardCls) -- | With this domain, semantic information can be parameterized. In -- practice it is only used if the compilation cannot proceed past the -- type checking phase. data Dom name data IdDom -- | A short form of showing a range, without file name, for debugging -- purposes. shortShowSpan :: SrcSpan -> String shortShowSpanWithFile :: SrcSpan -> String -- | A stage where the annotation controls how the original source code can -- be retrieved from the AST. A source template is assigned to each node. -- It has holes where the content of an other node should be printed and -- ranges for the source code of the node. data SrcTemplateStage -- | A class for traversing source information in an AST class SourceInfoTraversal (a :: * -> * -> *) sourceInfoTraverseUp :: (SourceInfoTraversal a, Monad f) => SourceInfoTrf f st1 st2 -> f () -> f () -> a dom st1 -> f a dom st2 sourceInfoTraverseDown :: (SourceInfoTraversal a, Monad f) => SourceInfoTrf f st1 st2 -> f () -> f () -> a dom st1 -> f a dom st2 sourceInfoTraverse :: (SourceInfoTraversal a, Monad f) => SourceInfoTrf f st1 st2 -> a dom st1 -> f a dom st2 sourceTemplateNodeRange :: Simple Lens SpanInfo SrcTemplateStage SrcSpan sourceTemplateNodeElems :: Simple Lens SpanInfo SrcTemplateStage [SourceTemplateElem] sourceTemplateListRange :: Simple Lens ListInfo SrcTemplateStage SrcSpan srcTmpListBefore :: Simple Lens ListInfo SrcTemplateStage String srcTmpListAfter :: Simple Lens ListInfo SrcTemplateStage String srcTmpDefaultSeparator :: Simple Lens ListInfo SrcTemplateStage String srcTmpIndented :: Simple Lens ListInfo SrcTemplateStage Maybe [Bool] srcTmpSeparators :: Simple Lens ListInfo SrcTemplateStage [([SourceTemplateTextElem], SrcSpan)] sourceTemplateOptRange :: Simple Lens OptionalInfo SrcTemplateStage SrcSpan srcTmpOptBefore :: Simple Lens OptionalInfo SrcTemplateStage String srcTmpOptAfter :: Simple Lens OptionalInfo SrcTemplateStage String data SourceTemplateTextElem NormalText :: String -> SourceTemplateTextElem [_sourceTemplateText] :: SourceTemplateTextElem -> String StayingText :: String -> String -> SourceTemplateTextElem [_sourceTemplateText] :: SourceTemplateTextElem -> String [_lineEndings] :: SourceTemplateTextElem -> String sourceTemplateText :: Lens SourceTemplateTextElem SourceTemplateTextElem String String data UnsupportedExtension UnsupportedExtension :: String -> UnsupportedExtension data SpliceInsertionProblem SpliceInsertionProblem :: SrcSpan -> String -> SpliceInsertionProblem data ConvertionProblem ConvertionProblem :: SrcSpan -> String -> ConvertionProblem UnrootedConvertionProblem :: String -> ConvertionProblem data TransformationProblem TransformationProblem :: String -> TransformationProblem data BreakUpProblem BreakUpProblem :: RealSrcSpan -> SrcSpan -> [SrcSpan] -> BreakUpProblem [bupOuter] :: BreakUpProblem -> RealSrcSpan [bupInner] :: BreakUpProblem -> SrcSpan [bupSiblings] :: BreakUpProblem -> [SrcSpan] data PrettyPrintProblem PrettyPrintProblem :: String -> PrettyPrintProblem