-- refactoring commands added to pfe command interpreter -- this file is generated from GenEditorInterfaces.hs -- by calling the executable as follows: -- editors/GenEditorInterfaces pfeRefactoringCmds > refactorer/PfeRefactoringCmds.hs module PfeRefactoringCmds where import PfeParse import RefacMoveDef import RefacRenaming import RefacDupDef import RefacCacheMerge import RefacNewDef import RefacSlicTuple import RefacMerge import RefacRmDef import RefacAddRmParam import RefacGenDef import RefacMvDefBtwMod import DuplicateCode import RefacCleanImps import ParseAnswers import RefacAddCon import RefacTypeSig import RefacADT import RefacSwapArgs import RefacRedunDec import RefacSlicing import RefacDeForest import RefacUnGuard import RefacFunDef import RefacAsPatterns import RefacUnfoldAsPatterns import RefacInstantiate import RefacDupTrans import RefacRemoveField import RefacAddField import RefacLetWhere import RefacRmCon import RefacWhereLet import RefacIntroPattern import RefacSimplify import RefacGenFold import RefacGenCache import RefacIdentify pfeRefactoringCmds = [ -- menu Names/Scopes ("rename",(args " " rename, " Rename a variable name")) ,("liftToTopLevel",(args " " liftToTopLevel, " Lift a local declaration to top level")) ,("liftOneLevel",(args " " liftOneLevel, " Lift a local declaration one level up")) ,("demote",(args " " demote, " Demote a declaration to where it is used")) ,("refacTypeSig",(args " " refacTypeSig, " Generates type signatures for top-level definitions using GHC.")) ,("parseAnswers",(args " " parseAnswers, " Read in an answer")) ,("letToWhere",(args " " letToWhere, " Converts a let expression into a where equation.")) ,("whereToLet",(args " " whereToLet, " Converts a where equation into a let expression")) ,("introPattern",(args " " introPattern, " Replace variable with exhaustive set of patterns")) ,("introCase",(args " " introCase, " Introduction of cases analysis via a pattern variable")) ,("foldPattern",(args " " foldPattern, " Folds a sub-expression against a pattern variable")) -- menu Slicing ,("refacRedunDec",(args " " refacRedunDec, " Removes redundant declarations in a where clause or expression")) ,("refacSlicing",(args " " refacSlicing, " Slices a subexpression")) ,("refacSlicTuple",(args " " refacSlicTuple, " slices a definition which returns a tuple")) ,("refacMerge",(args " " refacMerge, " Merges multiple definitions to form one single definition.")) ,("refacCacheMerge",(args " " refacCacheMerge, " Adds a definition to the cache for merging.")) ,("refacInstantiate",(args " " refacInstantiate, " Instantiates patterns in a generalised function clause")) -- menu Fold/Unfold ,("unfoldDef",(args " " unfoldDef, " Unfold a definition")) ,("subFunctionDef",(args " " subFunctionDef, " Folds against a definition")) ,("genFold",(args " " genFold, " Replace an instance of the right hand side of a definition by the corresponding left hand side, creating a new recursive definition.")) ,("genFoldCache",(args " " genFoldCache, " Places an selcted equation into a cache for use by generative fold.")) ,("refacAsPatterns",(args " " refacAsPatterns, " Converts all appropriate patterns to use an as binding.")) ,("refacUnfoldAsPatterns",(args " " refacUnfoldAsPatterns, " Converts all references to an as pattern to the actuall pattern.")) ,("simplifyExpr",(args " " simplifyExpr, " Attempts to simplify a case expression.")) -- menu Definitions ,("introNewDef",(args " " introNewDef, " Introduce a new definition")) ,("generaliseDef",(args " " generaliseDef, " Generalise a definition")) ,("removeDef",(args " " removeDef, " Remove a definition if it is no used")) ,("duplicateDef",(args " " duplicateDef, " Duplicate a definition at the same level")) ,("addOneParameter",(args " " addOneParameter, " Add parameter (default undefined)")) ,("rmOneParameter",(args " " rmOneParameter, " Remove unused parameter")) ,("moveDefBtwMod",(args " " moveDefBtwMod, " Move a definition from one module to another module")) ,("guardToIte",(args " " guardToIte, " Converts guards to an if then else")) ,("deforest",(args " " deforest, " A (partial) implementation of the warm fusion algorithm")) -- menu Import/Export ,("cleanImports",(args " " cleanImports, " Tidy up the import list of the current module")) ,("mkImpExplicit",(args " " mkImpExplicit, " Make the used entities explicit")) ,("addToExport",(args " " addToExport, " Add an identifier to the export list")) ,("rmFromExport",(args " " rmFromExport, " Remove an identifier from the export list")) -- menu Data types ,("addFieldLabels",(args " " addFieldLabels, " Add field labels to a data type declaration")) ,("addDiscriminators",(args " " addDiscriminators, " Add discriminator functions to a data type declaration")) ,("addConstructors",(args " " addConstructors, " Add constructor functions to a data type declaration")) ,("elimNestedPatterns",(args " " elimNestedPatterns, " Eliminate nested pattern matchings")) ,("elimPatterns",(args " " elimPatterns, " Eliminate pattern matchings")) ,("createADTMod",(args " " createADTMod, " Create an new ADT module")) ,("fromAlgebraicToADT",(args " " fromAlgebraicToADT, " Transforms an algebraic data type to an ADT")) ,("refacAddCon",(args " " refacAddCon, " Adds a new constructor to a data type")) ,("refacRmCon",(args " " refacRmCon, " Removes constructor from a data type")) ,("refacRemoveField",(args " " refacRemoveField, " Removes a field from a data type")) ,("refacAddField",(args " " refacAddField, " Adds a field to a data type")) -- menu Duplicate Code ,("duplicateCode",(args " " duplicateCode, " Analysis a project for code duplication.")) ,("refacDupTrans",(args " " refacDupTrans, " Transforms duplicate code")) ,("refacIdentify",(args " " refacIdentify, " identifies a clone class")) ]