aL;      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:portablebetajpmoresmau@gmail.comNone Usage structure @information about files to load (single file or multiple files) Aimport clean operation: the span of text to change, the new text a cabal package name of package version !is the package exposed or hidden 3components in the cabal file that use this package fall modules. We keep all modules so that we can try to open non exposed but imported modules directly component in cabal file  test suite test suite name  executable executable name library is the test suite buildable is the executable buildable is the library buildable !#Verbosity settings &>information about the thing at a given point in the source .(build flags for a specific file 0flags for GHC 1flags for preprocessor 2module name if known 3&component used to get flags, if known 4 complete result for outline 6outline contents 7exports 8imports 9'definition of an import statement ; module name < package name =location in source file >is the import qualified ?3is the import element list for hiding or exposing @ alias name Aspecific import elements B#definition of an import element Dname Etype Flocation in source file G#children (constructor names, etc.) Hdefinition of export Jname Ktype Llocation in source file M#children (constructor names, etc.) NType of import/export directive Oreexport module Pspecific import/ export list Qimport/export everything RAbs SVar T Lexer token Vtype of token W location Xelement of the outline result Zname [#types: can have several to combine \span in source ]children (constructors...) ^type signature if any _comment if any, `comment start line if any, adefinition of a name cname d#types: can have several to combine etype signature if any f/Span inside a file, the file is known and doesn't need to be repeated hstart location i end location j3Location inside a file, the file is known and doesn't need to be repeated lline mcolumn n)type of elements for the outline z.result for building one file: success + names ,data Build1Result=Build1Result Bool [NameDef]  deriving (Show,Read,Eq) $instance ToJSON Build1Result where ( toJSON (Build1Result b ns)= object [r .= b, ns .= map toJSON ns] %instance FromJSON Build1Result where ' parseJSON (Object v) =Build1Result  $  v .: r  *  v .: ns  parseJSON _= mzero #which cabal file to use operations {1use temporary file that was saved in temp folder |use proper file }!result: success + files impacted esimple type encapsulating the fact the operations return along with notes generated on files a note on a source file status of the note message where the note is location of a note/%error (lines and columns start at 1)  source file line column  end line  end line "status of notes: error or warning the state we keep name of temporary folder path to the cabal executable path of the project cabal file verbosity of logging flags to pass cabal #extra arguments to cabal configure log call to cabal  State type Fread an object from a String, with a given error message if it fails 8build an empty span in a given file at a given location is a note an error? do spans overlap? does span overlap location? construct a file span Econstructs an OutlineDef with no children and no type signature Bconstructs an OutlineDef with children and no type signature .get the full path for the temporary directory Wget the full path for the temporary dist directory (where cabal will write its output) @get full path in temporary folder for source file (i.e. where we'<re going to write the temporary contents of an edited file) -get the full, canonicalized path of a source get the full path of a source 7copy a file from the normal folders to the temp folder 5is the source file more recent than the target file? 0replace relative file path by module name get the cabal component name get files to load  _http://book.realworldhaskell.org/read/io-case-study-a-library-for-searching-the-filesystem.html  _http://book.realworldhaskell.org/read/io-case-study-a-library-for-searching-the-filesystem.html ;delete files in temp folder but not in real folder anymore delete all temporary files delete generated files Fdebug method: fromJust with a message to display when we get Nothing ?remove a base directory from a string representing a full path #nub for Ord objects: use a set 8debug method to vaguely format JSON result to dump them Cread a string from a file, forcing the read and closing the handle write string to file *perform operation on a binary opened file   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ start line  start column  end line  end column name #types: can have several to combine span in source name #types: can have several to combine span in source children (constructors...) relative path of source file relative path of source file relative path of source file  copy even if temp file is newer relative path of source file =return Just the file if copied, Nothing if no copy was done ;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~}~z|{nyxwvutsrqpojklmfghiabcdeXYZ[\]^_`TUVWNSRQPOHIJKLMBCDEFG9:;<=>?@A45678./0123&'()*+,-!%$#"     _      !%$#"&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNSRQPOTUVWXYZ[\]^_`abcdefghijklmn yxwvutsrqpoz|{}~;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`portablebetajpmoresmau@gmail.comNonea simple type for search function b?get the file storing the information for the given source file c?get the file storing the information for the given source file dremove the storage file estore the build flags f.generate the JSON from the typechecked module c this incorporates info from the renamed source with types annotations from the typechecked source gstore the GHC generated AST h!read the GHC AST as a JSON value i/read the build flags and notes as a JSON value j?utility function to store the given value under the given key k7read the top JSON value containing all the information lwrite the usage info file mread the usage info file nrconvert a Data into a JSON value, with specific treatment for interesting GHC AST objects, and avoiding the holes o.find in JSON AST and return the string result pfind in JSON AST qfind in JSON AST r+sort Value by position, descending s@overlap function: find whatever is at the given line and column tDcontains function: find whatever is contained inside the given span u9isGHCType function: find whatever has the proper GHCType v"extract the source span from JSON w&extract the source location from JSON x"resolve the type of an expression y*Reduce type-level applications by pushing z@ arguments on a stack and binding them in an environment at the  appropriate {N. Class constraints that have no free variables after reduction are removed. #abthe source file cthe source file dthe source file ethe source file build flags and notes fgthe source file  the GHC AST hthe source file ithe source file jthe source file +the key under which the value will be put  the value kthe source file lthe source file  the value mthe source file n|}~o should the output be qualified? "should the output be fully typed? result of search pthe evaluation function $the root object containing the AST qthe evaluation function $the root object containing the AST rsline column t start line  start column  end line  end column u$the root object containing the AST vwxy#abcdefghijklmn|}~opqrstuvwxy#abcdefghijklmn|}~opqrstuvwxyportablebetajpmoresmau@gmail.comNone get the AST $get the ouline from the AST $get the ouline from the AST build the comment map get the import/export declarations -convert a HSE span into a buildwrapper span #all known extensions, as string  input text options the commented AST the commented AST Ithe map: key is line, value is start column, start line and comment text  the comment  the AST   portablebetajpmoresmau@gmail.comNone module, function/type, constructors get the GHC typechecked AST 0perform an action on the GHC Typechecked module &perform an action on the GHC JSON AST 5the main method loading the source contents into GHC Convert  to '[BWNote]'. BThis will mix warnings and errors, but you can split them back up  by filtering the '[BWNote]' based on the  bw_status. get all names in scope -get all names in scope, packaged in NameDefs -get all names in scope, packaged in NameDefs get the thing at a particular point (line/column) in the source 0 this is using the saved JSON info if available get the thing at a particular point (line/column) in the source 0 this is using the saved JSON info if available @convert a GHC SrcSpan to a Span, ignoring the actual file info )convert a GHC SrcSpan to a BWLocation Mconvert a column info from GHC to our system (1 based) =convert a column info from our system (1 based) to GHC LGet a stream of tokens generated by the GHC lexer from the current document LGet a stream of tokens generated by the GHC lexer from the current document +like lexTokenStream, but keep Haddock flag _Filter tokens whose span appears legitimate (start line is less than end line, start column is  less than end column.) EConvert a GHC token to an interactive token (abbreviated token type) NGenerate the interactive token list used by EclipseFP for syntax highlighting &Extract occurrences based on lexing OParse the current document, generating a TokenDef list, filtered by a function OParse the current document, generating a TokenDef list, filtered by a function LPreprocess some source, returning the literate and Haskell source as tuple. -convert a GHC error message to our note type /convert a GHC warning message to our note type .remove the initial status text from a message make unqualified token ?make qualified token: join the qualifier and the name by a dot JMake a token definition from its source location and Lexer.hs token type. (mkTokenDef :: Located Token -> TokenDef FmkTokenDef (L sp t) = TokenDef (mkTokenName t) (ghcSpanToLocation sp) clean imports <the source file the base directory the module name the GHC options  the action the source file the base directory the module name the GHC options  the action the source file the base directory the module name the GHC options *the final action to perform on the result .transform given file path to find bwinfo path the base directory  what to load the GHC options the GHC options *the final action to perform on the result .transform given file path to find bwinfo path the base directory  what to load add the target? base directory  GHC messages  source path base directory  module name build options  source path base directory  module name build options  source path base directory  module name build options line column A -> Bool ^ do we want the result qualified by the module E -> Bool ^ do we want the full type or just the haddock type source file path base directory  module name  build flags  start line  start column  end line  end column source file path base directory  module name  build flags Base directory The file path to the document  The document' s contents  The options The file path to the document  The document' s contents <Project root or base directory for absolute path conversion Contents to be parsed Token value to find 9Literate source flag (True = literate, False = ordinary) Options  The project's root directory ,The current document contents, to be parsed Literate Haskell flag  The options 0Transform function from GHC tokens to TokenDefs The TokenDef filter function  The project's root directory ,The current document contents, to be parsed Literate Haskell flag 0Transform function from GHC tokens to TokenDefs The TokenDef filter function the source contents is the source literate Haskell ;the preprocessor tokens and the final valid Haskell source  the name the qualifier  the name  source path base directory  module name build options format? ;;8 portablebetajpmoresmau@gmail.comNone!Types of cabal package databases GFetch the installed package info from the global and user package.conf 4 databases, mimicking the functionality of ghc-pkg. 8Read the contents of the given directory, searching for .conf files, and parse the K package contents. Returns a singleton list (directory, [installed packages]) )the path to the cabal-dev sandbox if any The package database Installed packages portablebetajpmoresmau@gmail.comNone .the cabal build info for a specific component the build info the component local build info (the folder to build that component into is the component the library Pthe module name and corresponding source file for each contained Haskell module the component handle run cabal build run cabal build run cabal configure $get the full path to the cabal file 2get Cabal build info, running configure if needed 'run a action with the cabal build info 7parse cabal error messages and transform them in notre  parse messages from build  add a message to the note (get the path of a file getting compiled )canonicalize the paths in the build info Aapply a function on the build info modules and paths, in a monad 5apply a function on the build info modules and paths +get the build info for a given source file J if a source file is in several component, get the first one 'get GHC options for a file get CPP options for a file get the cabal extensions +get the source directory from a build info Kget all components, referencing all the files found in the source folders Wget all components, referencing only the files explicitely indicated in the cabal file )convert a ModuleName to a String %get all components in the Cabal file +get all the dependencies in the cabal file ]get all dependencies from the package description and the list of installed packages 8get all components from the package description 1>do we want output (True) or just compilation without linking? &use original cabal or temp cabal file can we rerun configure again >do we want output (True) or just compilation without linking? &use original cabal or temp cabal file &use original cabal or temp cabal file 8return the build info on success, or Nothing on failure &use original cabal or temp cabal file &use original cabal or temp cabal file &use original cabal or temp cabal file %action to run if we get a build info @the result of the action, or Nothing if we could get Cabal info  cabal file path to cabal executable  error output path to cabal executable path to cabal executable   cabal file path to cabal executable line   cabal file path to cabal executable the dist directory the build output  the cabal file  the dist dir   original note message lines the message line the path if we could parse it the function to apply the original build info  the result the function to apply the original build info  the result the source file 8the cabal component to use, or Nothing if not specified the cabal info ,the module name and the options to pass GHC the cabal info the list of CPP options the cabal info %the module name and cabal extensions the build info &the source paths, guaranteed non null the build info )the path to the cabal-dev sandbox if any the result is an array of tuples: the path to the package database, the list of packages in that db that the Cabal file references the cabal description 5the installed packages, by package database location 6the referenced packages, by package database location the package description the package description  !"1      !"1      !"*      !"portablebetajpmoresmau@gmail.comNone#8copy all files from the project to the temporary folder $synchronize one file only %!write contents to temporary file &run cabal configure 'run cabal build (!generate usage information files )build one source file in GHC *build one source file in GHC +preprocess a file ,&get the build flags for a source file -3get haskell-src-exts commented AST for source file .(get GHC typechecked AST for source file /!perform an action on the GHC AST 1get outline for source file 2+get all occurrences of a token in the file 'get lexer token types for source file 4get thing at point 5get locals identifiers 61get all names in scope (GHC API) 7get cabal dependencies 8get cabal components 9clean imports in a source file #[if true copy all files, if false only copy files newer than their corresponding temp files ;return the list of files copied, the list of files deleted $balways copy the file, if false only copy the file if it is newer than its corresponding temp file &the source file in the project folder 1return Nothing if no copy or Just file if copied %'the source file in the project folder the contents &use the source or temp cabal True if configure succeeded '>do we want output (True) or just compilation without linking? &use original cabal or temp cabal file (5should we return all files or only the changed ones? the cabal component name )the source file 9the cabal component to use, or Nothing if not specified +Just names in scope if build is successful *the source file 9the cabal component to use, or Nothing if not specified True if build is successful +the build flags the file to preprocess the resulting code ,the source file 9the cabal component to use, or Nothing if not specified -the source file 9the cabal component to use, or Nothing if not specified .the source file 9the cabal component to use, or Nothing if not specified /the source file 9the cabal component to use, or Nothing if not specified 0the source file 9the cabal component to use, or Nothing if not specified 1 source file 9the cabal component to use, or Nothing if not specified 2the source file 3the source file the token to search for 9the cabal component to use, or Nothing if not specified 4the source file  the line  the column 9the cabal component to use, or Nothing if not specified 6 -> Bool -- ^ do we want the result qualified? 2 -> Bool -- ^ do we want the result typed? 5the source file the start line the start column  the end line the end column 9the cabal component to use, or Nothing if not specified 69the cabal component to use, or Nothing if not specified 789the source file format? 9the cabal component to use, or Nothing if not specified : everything? #$%&'()*+,-./0123456789:#$%&'()*+,-./0123456789:#$%&'()*+,-./0123456789:      !"#$%&'()*+,--./012344567899:;<==>?@ABCDEEFGHIJJKLMNOPQRSTUUVWXXYZ[\]^_``abcddefgghijklmnopqrstuvwxyyz{{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrpqstuvwxyz{|}~        buildwrapper-0.7.6"Language.Haskell.BuildWrapper.Base!Language.Haskell.BuildWrapper.GHC#Language.Haskell.BuildWrapper.Cabal!Language.Haskell.BuildWrapper.API(Language.Haskell.BuildWrapper.GHCStorage!Language.Haskell.BuildWrapper.SrcGHCMessages&Language.Haskell.BuildWrapper.PackagesUsage usPackageusModuleusName usSectionusTypeusLocusDef LoadContents MultipleFilelmFiles SingleFilelmFilelmModule ImportCleanicSpanicText CabalPackagecpName cpVersion cpExposed cpDependent cpModulesCabalComponent CCTestSuite ccTestName CCExecutable ccExeName CCLibrary ccBuildable Verbosity DeafeningVerboseNormalSilent ThingAtPointtapName tapModuletapTypetapQTypetapHTypetapGType BuildFlagsbfAst bfPreproc bfModName bfComponent OutlineResult orOutline orExports orImports ImportDefiModuleiPackageiLoc iQualifiediHidingiAlias iChildren ImportSpecDefisNameisTypeisLoc isChildren ExportDefeNameeTypeeLoc eChildrenImportExportTypeIEModule IEThingWith IEThingAllIEAbsIEVarTokenDeftdNametdLoc OutlineDefodNameodTypeodLoc odChildren odSignature odCommentodStartLineCommentNameDefndNamendType ndSignature InFileSpanifsStartifsEnd InFileLociflLine iflColumnOutlineDefTypeSplice ConstructorFieldInstanceTypeSynPatternFunctionFamilyDataClass WhichCabalTargetSource BuildResultOpResultBWNote bwnStatusbwnTitle bwnLocation BWLocationbwlSrcbwlLinebwlCol bwlEndLine bwlEndCol BWNoteStatus BWWarningBWErrorBuildWrapperState tempFolder cabalPath cabalFile verbosity cabalFlags cabalOpts logCabalArgs BuildWrapperreadObj mkEmptySpan isBWNoteError ifsOverlap iflOverlap mkFileSpan mkOutlineDefmkOutlineDefWithChildrengetFullTempDir getDistDir getTargetPathcanonicalizeFullPath getFullSrc copyFromMainisSourceMoreRecent fileToModulecabalComponentName getLoadFilesgetRecursiveContentsgetRecursiveContentsHidden deleteGhosts deleteTempdeleteGenerated fromJustDebug removeBaseDirnubOrd formatJSONreadFile writeFilewithBinaryFileFinalImportMapFinalImportValueTypeMap ImportMapAliasMap PPBehaviorContinuePragmaStartIndentContinueGHCApplyFunctiongetASTwithAST withJSONAST withASTNotesinitGHCghcWithASTNotesghcMessagesToNotesgetGhcNamesInScopegetGhcNameDefsInScope getGhcNameDefsInScopeLongRunningname2ndgetThingAtPointJSON getLocalsJSONghcSpanToLocationghcSpanToBWLocationghcColToScionColscionColToGhcColghctokensArbitraryghctokensArbitrary'lexTokenStreamHlexLoc lexerFlags ofInterest tokenToTypetokenTypesArbitrarytokenTypesArbitrary' occurrencesgenerateTokensgenerateTokens'preprocessSourceghcErrMsgToNoteghcWarnMsgToNote ghcMsgToNote removeStatusmkUnqualTokenValuemkQualifiedTokenValue mkTokenName tokenTypedotFS tokenValuestartendghcImportToUsage ghcLIEToUsageghcExportToUsageghcNameToUsage ghcImportMapghcCleanImportsCabalBuildInfo cbiBuildInfocbiComponentBuildInfocbiBuildFolder cbiIsLibrarycbiModulePaths cbiComponentgetCabalLibraryVersiongetFilesToCopycabalV cabalBuild cabalBuild'cabalConfigure getCabalFile cabalInit withCabalparseCabalMessagessetupExefromCabalDevExe dropPrefixesstripPrefixIfNeeded addCurrentcabalErrorLineparseBuildMessagesvalidLocreadIntmakeNote getBuiltPathcanonicalizeBuildInfoonModulePathsM onModulePaths getBuildInfofileGhcOptionsfileCppOptionscabalExtensions getSourceDirs getAllFilesgetReferencedFilesstringToModuleNamemoduleToStringcabalComponentscabalDependencies dependenciescabalComponentsFromDescriptioncabalComponentsDependenciescabalComponentFromLibrarycabalComponentFromExecutablecabalComponentFromTestSuite synchronize synchronize1write configurebuild generateUsagebuild1build1LongRunningpreproc getBuildFlags getGHCAST withGHCAST withGHCAST' getOutline getTokenTypesgetOccurrencesgetThingAtPoint getLocalsgetNamesInScopegetCabalDependenciesgetCabalComponents cleanImportsclean$fFromJSONImportClean$fToJSONImportClean$fFromJSONCabalPackage$fToJSONCabalPackage$fFromJSONCabalComponent$fToJSONCabalComponent$fFromJSONThingAtPoint$fToJSONThingAtPoint$fFromJSONBuildFlags$fToJSONBuildFlags$fFromJSONOutlineResult$fToJSONOutlineResult$fFromJSONImportDef$fToJSONImportDef$fFromJSONImportSpecDef$fToJSONImportSpecDef$fFromJSONExportDef$fToJSONExportDef$fFromJSONImportExportType$fToJSONImportExportType$fFromJSONTokenDef$fToJSONTokenDef$fFromJSONOutlineDef$fToJSONOutlineDef$fFromJSONNameDef$fToJSONNameDef$fFromJSONInFileSpan$fToJSONInFileSpan$fFromJSONOutlineDefType$fToJSONOutlineDefType$fFromJSONBuildResult$fToJSONBuildResult$fFromJSONBWNote$fToJSONBWNote$fFromJSONBWLocation$fToJSONBWLocation$fFromJSONBWNoteStatus$fToJSONBWNoteStatusFindFunc getInfoFile getUsageFile clearInfostoreBuildFlagsInfogenerateGHCInfo storeGHCInfo readGHCInforeadBuildFlagsInfo setStoredInforeadStoredInfo setUsageInfo getUsageInfo dataToJSONfindInJSONFormatted findInJSON findAllInJSONlastPosoverlapcontains isGHCTypeextractSourceSpanextractSourceLoc typeOfExpr reduceType ghc-7.6.3TypeRepAppTyForAllTyshowSD showSDUser showSDDump srcSpanToJSON srcLocToJSONtypesInsideTypefindInJSONData extractUsages extractName extractSource getHSEAST getHSEOutlinegetModuleLocationbuildCommentMapgetHSEImportExportmakeSpanknownExtensionNamesnameDecl cnameDecl qnameDecl mnnameDecl $fMonoidBagCabalPkgDBType getPkgInfos readContentsInstalledPackagesListPkgFile PkgDirectoryInstalledPackageInfoString getLibDir