+      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     Nonel Usage structure 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 *(build flags for a specific file ,flags for GHC -flags for preprocessor .module name if known /&component used to get flags, if known 0 complete result for outline 2outline contents 3exports 4imports 5'definition of an import statement 7 module name 8 package name 9location in source file :is the import qualified ;3is the import element list for hiding or exposing < alias name =specific import elements >#definition of an import element @name Atype Blocation in source file C#children (constructor names, etc.) Ddefinition of export Fname Gtype Hlocation in source file I#children (constructor names, etc.) JType of import/export directive Kreexport module Lspecific import/ export list Mimport/export everything NAbs OVar P Lexer token Rtype of token S location Telement of the outline result Vname W#types: can have several to combine Xspan in source Ychildren (constructors...) Ztype signature if any [comment if any ^name _#types: can have several to combine `type signature if any a/Span inside a file, the file is known and doesn't need to be repeated cstart location d end location e3Location inside a file, the file is known and doesn't need to be repeated gline hcolumn i)type of elements for the outline u.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 v1use temporary file that was saved in temp folder wuse proper file x!result: success + files impacted zesimple 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  State type 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 0replace relative file path by module name http:book.realworldhaskell.orgread:io-case-study-a-library-for-searching-the-filesystem.html ;delete files in temp folder but not in real folder anymore 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   !"#$%&'()*+,-./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  !"#$%&'()*+,-./0123456789:;<=>  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~{|}~zxyuwvitsrqponmlkjefghabcd\]^_`TUVWXYZ[PQRSJONMLKDEFGHI>?@ABC56789:;<=01234*+,-./"#$%&'()!   Y   ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJONMLKPQRSTUVWXYZ[\]^_`abcdefghi tsrqponmlkjuwvxyz{|}~ !"#$%&'()*+,-./0123456789:;<=>None? simple type for search function @?get the file storing the information for the given source file A?get the file storing the information for the given source file Bremove the storage file Cstore the build flags D.generate the JSON from the typechecked module c this incorporates info from the renamed source with types annotations from the typechecked source Estore the GHC generated AST F!read the GHC AST as a JSON value G/read the build flags and notes as a JSON value H?utility function to store the given value under the given key I7read the top JSON value containing all the information Jwrite the usage info file Kread the usage info file Lrconvert a Data into a JSON value, with specific treatment for interesting GHC AST objects, and avoiding the holes M.find in JSON AST and return the string result Nfind in JSON AST O+sort Value by position, descending P@overlap function: find whatever is at the given line and column Q"extract the source span from JSON R&extract the source location from JSON S"resolve the type of an expression T*Reduce type-level applications by pushing U@ arguments on a stack and binding them in an environment at the  appropriate VN. Class constraints that have no free variables after reduction are removed. ?@the source file Athe source file Bthe source file Cthe source file build flags and notes DEthe source file  the GHC AST Fthe source file Gthe source file Hthe source file +the key under which the value will be put  the value Ithe source file Jthe source file  the value Kthe source file LWXYZ[\M should the output be qualified? "should the output be fully typed? result of search ]Nthe evaluation function $the root object containing the AST OPline column ^$the root object containing the AST _`QRST ?@ABCDEFGHIJKLWXYZ[\M]NOP^_`QRST ?@ABCDEFGHIJKLWXYZ[\M]NOP^_`QRSTNoneget 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 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 _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 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) ,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 base directory  GHC messages  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 Base directory The file path to the document  The document' s contents  The options <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 source contents is the source literate Haskell ;the preprocessor tokens and the final valid Haskell source  the name the qualifier  the name a++)aNoneb get the AST c$get the ouline from the AST d$get the ouline from the AST ebuild the comment map fget the import/export declarations g-convert a HSE span into a buildwrapper span h#all known extensions, as string b input text options cthe commented AST dthe commented AST e=the map: key is line, value is start column and comment text  the comment f the AST ijklgh bcdefijklgh bcdefijklgh Nonem!Types of cabal package databases nGFetch the installed package info from the global and user package.conf 4 databases, mimicking the functionality of ghc-pkg. o8Read the contents of the given directory, searching for .conf files, and parse the K package contents. Returns a singleton list (directory, [installed packages]) pmqrsnoThe package database Installed packages tnpmrqsnotNone .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 .>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  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 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 ..'None8copy 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 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 get outline for source file +get all occurrences of a token in the file 'get lexer token types for source file get thing at point 1get all names in scope (GHC API) get cabal dependencies get cabal components [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 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 the source file 9the cabal component to use, or Nothing if not specified  source file 9the cabal component to use, or Nothing if not specified the source file the source file the token to search for 9the cabal component to use, or Nothing if not specified the 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? 9the cabal component to use, or Nothing if not specified                u      !"#$%&'()**+,-./011234566789::;<=>?@ABBCDEFGGHIJKLMNOPQRRSTUUVWXYZ[\\]^_``abccdefghijklmnopqrstuuvwwxyz{{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNLMOPQRSTUVWXYZ[\]^_`abcde f g h i j k l mnbuildwrapper-0.6.2"Language.Haskell.BuildWrapper.Base!Language.Haskell.BuildWrapper.GHC#Language.Haskell.BuildWrapper.Cabal!Language.Haskell.BuildWrapper.API(Language.Haskell.BuildWrapper.GHCStorageGHCMessages!Language.Haskell.BuildWrapper.Src&Language.Haskell.BuildWrapper.PackagesUsage usPackageusModuleusName usSectionusTypeusLocusDef LoadContents MultipleFilelmFiles SingleFilelmFilelmModule 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 odCommentNameDefndNamendType ndSignature InFileSpanifsStartifsEnd InFileLociflLine iflColumnOutlineDefTypeSplice ConstructorFieldInstanceTypeSynPatternFunctionFamilyDataClass WhichCabalTargetSource BuildResultOpResultBWNote bwnStatusbwnTitle bwnLocation BWLocationbwlSrcbwlLinebwlCol bwlEndLine bwlEndCol BWNoteStatus BWWarningBWErrorBuildWrapperState tempFolder cabalPath cabalFile verbosity cabalFlags cabalOpts BuildWrapperreadObj mkEmptySpan isBWNoteError ifsOverlap iflOverlap mkFileSpan mkOutlineDefmkOutlineDefWithChildrengetFullTempDir getDistDir getTargetPathcanonicalizeFullPath getFullSrc copyFromMainisSourceMoreRecent fileToModulecabalComponentName getLoadFilesgetRecursiveContents deleteGhosts fromJustDebug removeBaseDirnubOrd formatJSONreadFile writeFilewithBinaryFileAliasMap PPBehaviorStartIndentContinueGHCApplyFunctiongetASTwithAST withJSONAST withASTNotesghcMessagesToNotesgetGhcNamesInScopegetGhcNameDefsInScopegetThingAtPointJSONghcSpanToLocationghcSpanToBWLocationghcColToScionColscionColToGhcColghctokensArbitrarylexLoc lexerFlags ofInterest tokenToTypetokenTypesArbitrary occurrencesgenerateTokenspreprocessSourceghcErrMsgToNoteghcWarnMsgToNote ghcMsgToNote removeStatusmkUnqualTokenValuemkQualifiedTokenValue mkTokenName tokenTypedotFS tokenValuestartendghcImportToUsage ghcLIEToUsageghcExportToUsageghcNameToUsageCabalBuildInfo cbiBuildInfocbiComponentBuildInfocbiBuildFolder cbiIsLibrarycbiModulePaths cbiComponentgetFilesToCopycabalV cabalBuild cabalBuild'cabalConfigure getCabalFile cabalInit withCabalparseCabalMessagessetupExe dropPrefixesstripPrefixIfNeeded addCurrentcabalErrorLineparseBuildMessagesvalidLocreadIntmakeNote getBuiltPathcanonicalizeBuildInfoonModulePathsM onModulePaths getBuildInfofileGhcOptionsfileCppOptionscabalExtensions getSourceDirs getAllFilesgetReferencedFilesstringToModuleNamemoduleToStringcabalComponentscabalDependencies dependenciescabalComponentsFromDescriptioncabalComponentFromLibrarycabalComponentFromExecutablecabalComponentFromTestSuite synchronize synchronize1write configurebuild generateUsagebuild1preproc getBuildFlags getGHCAST withGHCAST withGHCAST' getOutline getTokenTypesgetOccurrencesgetThingAtPointgetNamesInScopegetCabalDependenciesgetCabalComponents$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 findInJSONlastPosoverlapextractSourceSpanextractSourceLoc typeOfExpr reduceType ghc-7.6.1TypeRepAppTyForAllTyshowSD showSDUser showSDDump srcSpanToJSON srcLocToJSONtypesInsideTypefindInJSONData extractUsages extractName extractSource $fMonoidBag getHSEAST getHSEOutlinegetModuleLocationbuildCommentMapgetHSEImportExportmakeSpanknownExtensionNamesnameDecl cnameDecl qnameDecl mnnameDeclCabalPkgDBType getPkgInfos readContentsInstalledPackagesListPkgFile PkgDirectoryInstalledPackageInfoString getLibDir