-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A library and an executable that provide an easy API for a Haskell IDE -- -- Buildwrapper is an alternative to scion. It provides services to -- configure, build and give information on source files to help IDEs -- manage Haskell projects. You can use buildwrapper to build project and -- retrieve errors, get outline for each module source, get the type of -- something inside a source file, get lexer tokens, etc. Buildwrapper is -- used in the EclipseFP project (Eclipse plugins for Haskell -- development) @package buildwrapper @version 0.6.3 module Language.Haskell.BuildWrapper.Base -- | State type type BuildWrapper = StateT BuildWrapperState IO -- | the state we keep data BuildWrapperState BuildWrapperState :: String -> FilePath -> FilePath -> Verbosity -> String -> [String] -> BuildWrapperState -- | name of temporary folder tempFolder :: BuildWrapperState -> String -- | path to the cabal executable cabalPath :: BuildWrapperState -> FilePath -- | path of the project cabal file cabalFile :: BuildWrapperState -> FilePath -- | verbosity of logging verbosity :: BuildWrapperState -> Verbosity -- | flags to pass cabal cabalFlags :: BuildWrapperState -> String -- | extra arguments to cabal configure cabalOpts :: BuildWrapperState -> [String] -- | status of notes: error or warning data BWNoteStatus BWError :: BWNoteStatus BWWarning :: BWNoteStatus readObj :: Read a => String -> String -> a -- | location of a note/error (lines and columns start at 1) data BWLocation BWLocation :: FilePath -> Int -> Int -> Int -> Int -> BWLocation -- | source file bwlSrc :: BWLocation -> FilePath -- | line bwlLine :: BWLocation -> Int -- | column bwlCol :: BWLocation -> Int -- | end line bwlEndLine :: BWLocation -> Int -- | end line bwlEndCol :: BWLocation -> Int mkEmptySpan :: FilePath -> Int -> Int -> BWLocation -- | a note on a source file data BWNote BWNote :: BWNoteStatus -> String -> BWLocation -> BWNote -- | status of the note bwnStatus :: BWNote -> BWNoteStatus -- | message bwnTitle :: BWNote -> String -- | where the note is bwnLocation :: BWNote -> BWLocation isBWNoteError :: BWNote -> Bool -- | simple type encapsulating the fact the operations return along with -- notes generated on files type OpResult a = (a, [BWNote]) -- | result: success + files impacted data BuildResult BuildResult :: Bool -> [FilePath] -> BuildResult -- | 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 data WhichCabal -- | use proper file Source :: WhichCabal -- | use temporary file that was saved in temp folder Target :: WhichCabal -- | type of elements for the outline data OutlineDefType Class :: OutlineDefType Data :: OutlineDefType Family :: OutlineDefType Function :: OutlineDefType Pattern :: OutlineDefType Syn :: OutlineDefType Type :: OutlineDefType Instance :: OutlineDefType Field :: OutlineDefType Constructor :: OutlineDefType Splice :: OutlineDefType -- | Location inside a file, the file is known and doesn't need to be -- repeated data InFileLoc InFileLoc :: Int -> Int -> InFileLoc -- | line iflLine :: InFileLoc -> Int -- | column iflColumn :: InFileLoc -> Int -- | Span inside a file, the file is known and doesn't need to be repeated data InFileSpan InFileSpan :: InFileLoc -> InFileLoc -> InFileSpan -- | start location ifsStart :: InFileSpan -> InFileLoc -- | end location ifsEnd :: InFileSpan -> InFileLoc ifsOverlap :: InFileSpan -> InFileSpan -> Bool iflOverlap :: InFileSpan -> InFileLoc -> Bool -- | construct a file span mkFileSpan :: Int -> Int -> Int -> Int -> InFileSpan data NameDef NameDef :: Text -> [OutlineDefType] -> Maybe Text -> NameDef -- | name ndName :: NameDef -> Text -- | types: can have several to combine ndType :: NameDef -> [OutlineDefType] -- | type signature if any ndSignature :: NameDef -> Maybe Text -- | element of the outline result data OutlineDef OutlineDef :: Text -> [OutlineDefType] -> InFileSpan -> [OutlineDef] -> Maybe Text -> Maybe Text -> OutlineDef -- | name odName :: OutlineDef -> Text -- | types: can have several to combine odType :: OutlineDef -> [OutlineDefType] -- | span in source odLoc :: OutlineDef -> InFileSpan -- | children (constructors...) odChildren :: OutlineDef -> [OutlineDef] -- | type signature if any odSignature :: OutlineDef -> Maybe Text -- | comment if any odComment :: OutlineDef -> Maybe Text -- | constructs an OutlineDef with no children and no type signature mkOutlineDef :: Text -> [OutlineDefType] -> InFileSpan -> OutlineDef -- | constructs an OutlineDef with children and no type signature mkOutlineDefWithChildren :: Text -> [OutlineDefType] -> InFileSpan -> [OutlineDef] -> OutlineDef -- | Lexer token data TokenDef TokenDef :: Text -> InFileSpan -> TokenDef -- | type of token tdName :: TokenDef -> Text -- | location tdLoc :: TokenDef -> InFileSpan -- | Type of import/export directive data ImportExportType -- | Var IEVar :: ImportExportType -- | Abs IEAbs :: ImportExportType -- | import/export everything IEThingAll :: ImportExportType -- | specific import/export list IEThingWith :: ImportExportType -- | reexport module IEModule :: ImportExportType -- | definition of export data ExportDef ExportDef :: Text -> ImportExportType -> InFileSpan -> [Text] -> ExportDef -- | name eName :: ExportDef -> Text -- | type eType :: ExportDef -> ImportExportType -- | location in source file eLoc :: ExportDef -> InFileSpan -- | children (constructor names, etc.) eChildren :: ExportDef -> [Text] -- | definition of an import element data ImportSpecDef ImportSpecDef :: Text -> ImportExportType -> InFileSpan -> [Text] -> ImportSpecDef -- | name isName :: ImportSpecDef -> Text -- | type isType :: ImportSpecDef -> ImportExportType -- | location in source file isLoc :: ImportSpecDef -> InFileSpan -- | children (constructor names, etc.) isChildren :: ImportSpecDef -> [Text] -- | definition of an import statement data ImportDef ImportDef :: Text -> Maybe Text -> InFileSpan -> Bool -> Bool -> Text -> Maybe [ImportSpecDef] -> ImportDef -- | module name iModule :: ImportDef -> Text -- | package name iPackage :: ImportDef -> Maybe Text -- | location in source file iLoc :: ImportDef -> InFileSpan -- | is the import qualified iQualified :: ImportDef -> Bool -- | is the import element list for hiding or exposing iHiding :: ImportDef -> Bool -- | alias name iAlias :: ImportDef -> Text -- | specific import elements iChildren :: ImportDef -> Maybe [ImportSpecDef] -- | complete result for outline data OutlineResult OutlineResult :: [OutlineDef] -> [ExportDef] -> [ImportDef] -> OutlineResult -- | outline contents orOutline :: OutlineResult -> [OutlineDef] -- | exports orExports :: OutlineResult -> [ExportDef] -- | imports orImports :: OutlineResult -> [ImportDef] -- | build flags for a specific file data BuildFlags BuildFlags :: [String] -> [String] -> Maybe String -> Maybe String -> BuildFlags -- | flags for GHC bfAst :: BuildFlags -> [String] -- | flags for preprocessor bfPreproc :: BuildFlags -> [String] -- | module name if known bfModName :: BuildFlags -> Maybe String -- | component used to get flags, if known bfComponent :: BuildFlags -> Maybe String data ThingAtPoint ThingAtPoint :: String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> ThingAtPoint tapName :: ThingAtPoint -> String tapModule :: ThingAtPoint -> Maybe String tapType :: ThingAtPoint -> Maybe String tapQType :: ThingAtPoint -> Maybe String tapHType :: ThingAtPoint -> Maybe String tapGType :: ThingAtPoint -> Maybe String -- | get the full path for the temporary directory getFullTempDir :: BuildWrapper FilePath -- | get the full path for the temporary dist directory (where cabal will -- write its output) getDistDir :: BuildWrapper FilePath -- | get full path in temporary folder for source file (i.e. where we're -- going to write the temporary contents of an edited file) getTargetPath :: FilePath -> BuildWrapper FilePath -- | get the full, canonicalized path of a source canonicalizeFullPath :: FilePath -> BuildWrapper FilePath -- | get the full path of a source getFullSrc :: FilePath -> BuildWrapper FilePath -- | copy a file from the normal folders to the temp folder copyFromMain :: Bool -> FilePath -> BuildWrapper (Maybe FilePath) isSourceMoreRecent :: FilePath -> FilePath -> IO Bool -- | replace relative file path by module name fileToModule :: FilePath -> String -- | Verbosity settings data Verbosity Silent :: Verbosity Normal :: Verbosity Verbose :: Verbosity Deafening :: Verbosity -- | component in cabal file data CabalComponent -- | library CCLibrary :: Bool -> CabalComponent -- | is the test suite buildable -- -- is the executable buildable -- -- is the library buildable ccBuildable :: CabalComponent -> Bool -- | executable CCExecutable :: String -> Bool -> CabalComponent -- | executable name ccExeName :: CabalComponent -> String -- | is the test suite buildable -- -- is the executable buildable -- -- is the library buildable ccBuildable :: CabalComponent -> Bool -- | test suite CCTestSuite :: String -> Bool -> CabalComponent -- | test suite name ccTestName :: CabalComponent -> String -- | is the test suite buildable -- -- is the executable buildable -- -- is the library buildable ccBuildable :: CabalComponent -> Bool cabalComponentName :: CabalComponent -> String -- | a cabal package data CabalPackage CabalPackage :: String -> String -> Bool -> [CabalComponent] -> [String] -> CabalPackage -- | name of package cpName :: CabalPackage -> String -- | version cpVersion :: CabalPackage -> String -- | is the package exposed or hidden cpExposed :: CabalPackage -> Bool -- | components in the cabal file that use this package cpDependent :: CabalPackage -> [CabalComponent] -- | all modules. We keep all modules so that we can try to open non -- exposed but imported modules directly cpModules :: CabalPackage -> [String] data LoadContents SingleFile :: FilePath -> String -> LoadContents lmFile :: LoadContents -> FilePath lmModule :: LoadContents -> String MultipleFile :: [(FilePath, String)] -> LoadContents lmFiles :: LoadContents -> [(FilePath, String)] getLoadFiles :: LoadContents -> [(FilePath, String)] -- | -- http:book.realworldhaskell.orgreadio-case-study-a-library-for-searching-the-filesystem.html getRecursiveContents :: FilePath -> IO [FilePath] -- | delete files in temp folder but not in real folder anymore deleteGhosts :: [FilePath] -> BuildWrapper [FilePath] -- | debug method: fromJust with a message to display when we get Nothing fromJustDebug :: String -> Maybe a -> a -- | remove a base directory from a string representing a full path removeBaseDir :: FilePath -> String -> String -- | nub for Ord objects: use a set nubOrd :: Ord a => [a] -> [a] -- | debug method to vaguely format JSON result to dump them formatJSON :: String -> String -- | Usage structure data Usage Usage :: Maybe Text -> Text -> Text -> Text -> Bool -> Value -> Bool -> Usage usPackage :: Usage -> Maybe Text usModule :: Usage -> Text usName :: Usage -> Text usSection :: Usage -> Text usType :: Usage -> Bool usLoc :: Usage -> Value usDef :: Usage -> Bool readFile :: FilePath -> IO String writeFile :: FilePath -> String -> IO () withBinaryFile :: FilePath -> IOMode -> (Handle -> IO a) -> IO a instance Typeable WhichCabal instance Typeable BuildFlags instance Typeable ThingAtPoint instance Typeable Verbosity instance Show BWNoteStatus instance Read BWNoteStatus instance Eq BWNoteStatus instance Show BWLocation instance Read BWLocation instance Eq BWLocation instance Show BWNote instance Read BWNote instance Eq BWNote instance Show BuildResult instance Read BuildResult instance Eq BuildResult instance Show WhichCabal instance Read WhichCabal instance Eq WhichCabal instance Enum WhichCabal instance Data WhichCabal instance Show OutlineDefType instance Read OutlineDefType instance Eq OutlineDefType instance Ord OutlineDefType instance Enum OutlineDefType instance Show InFileLoc instance Read InFileLoc instance Eq InFileLoc instance Ord InFileLoc instance Show InFileSpan instance Read InFileSpan instance Eq InFileSpan instance Ord InFileSpan instance Show NameDef instance Read NameDef instance Eq NameDef instance Ord NameDef instance Show OutlineDef instance Read OutlineDef instance Eq OutlineDef instance Ord OutlineDef instance Show TokenDef instance Eq TokenDef instance Show ImportExportType instance Read ImportExportType instance Eq ImportExportType instance Ord ImportExportType instance Enum ImportExportType instance Show ExportDef instance Eq ExportDef instance Show ImportSpecDef instance Eq ImportSpecDef instance Show ImportDef instance Eq ImportDef instance Show OutlineResult instance Eq OutlineResult instance Show BuildFlags instance Read BuildFlags instance Eq BuildFlags instance Data BuildFlags instance Show ThingAtPoint instance Read ThingAtPoint instance Eq ThingAtPoint instance Data ThingAtPoint instance Show Verbosity instance Read Verbosity instance Eq Verbosity instance Ord Verbosity instance Enum Verbosity instance Bounded Verbosity instance Data Verbosity instance Eq CabalComponent instance Show CabalComponent instance Read CabalComponent instance Eq CabalPackage instance Show CabalPackage instance Show Usage instance Eq Usage instance FromJSON CabalPackage instance ToJSON CabalPackage instance FromJSON CabalComponent instance ToJSON CabalComponent instance FromJSON ThingAtPoint instance ToJSON ThingAtPoint instance FromJSON BuildFlags instance ToJSON BuildFlags instance FromJSON OutlineResult instance ToJSON OutlineResult instance FromJSON ImportDef instance ToJSON ImportDef instance FromJSON ImportSpecDef instance ToJSON ImportSpecDef instance FromJSON ExportDef instance ToJSON ExportDef instance FromJSON ImportExportType instance ToJSON ImportExportType instance FromJSON TokenDef instance ToJSON TokenDef instance FromJSON OutlineDef instance ToJSON OutlineDef instance FromJSON NameDef instance ToJSON NameDef instance FromJSON InFileSpan instance ToJSON InFileSpan instance FromJSON OutlineDefType instance ToJSON OutlineDefType instance FromJSON BuildResult instance ToJSON BuildResult instance FromJSON BWNote instance ToJSON BWNote instance FromJSON BWLocation instance ToJSON BWLocation instance FromJSON BWNoteStatus instance ToJSON BWNoteStatus module Language.Haskell.BuildWrapper.GHC type GHCApplyFunction a = FilePath -> TypecheckedModule -> Ghc a -- | get the GHC typechecked AST getAST :: FilePath -> FilePath -> String -> [String] -> IO (OpResult (Maybe TypecheckedSource)) -- | perform an action on the GHC Typechecked module withAST :: (TypecheckedModule -> Ghc a) -> FilePath -> FilePath -> String -> [String] -> IO (Maybe a) -- | perform an action on the GHC JSON AST withJSONAST :: (Value -> IO a) -> FilePath -> FilePath -> String -> [String] -> IO (Maybe a) -- | the main method loading the source contents into GHC withASTNotes :: GHCApplyFunction a -> (FilePath -> FilePath) -> FilePath -> LoadContents -> [String] -> IO (OpResult [a]) -- | Convert Messages to '[BWNote]'. -- -- This will mix warnings and errors, but you can split them back up by -- filtering the '[BWNote]' based on the bw_status. ghcMessagesToNotes :: DynFlags -> FilePath -> Messages -> [BWNote] -- | get all names in scope getGhcNamesInScope :: FilePath -> FilePath -> String -> [String] -> IO [String] -- | get all names in scope, packaged in NameDefs getGhcNameDefsInScope :: FilePath -> FilePath -> String -> [String] -> IO (OpResult (Maybe [NameDef])) -- | get the thing at a particular point (line/column) in the source -- this is using the saved JSON info if available getThingAtPointJSON :: Int -> Int -> FilePath -> FilePath -> String -> [String] -> IO (Maybe ThingAtPoint) -- | convert a GHC SrcSpan to a Span, ignoring the actual file info ghcSpanToLocation :: SrcSpan -> InFileSpan -- | convert a GHC SrcSpan to a BWLocation ghcSpanToBWLocation :: FilePath -> SrcSpan -> BWLocation -- | convert a column info from GHC to our system (1 based) ghcColToScionCol :: Int -> Int -- | convert a column info from our system (1 based) to GHC scionColToGhcCol :: Int -> Int -- | Get a stream of tokens generated by the GHC lexer from the current -- document ghctokensArbitrary :: FilePath -> String -> [String] -> IO (Either BWNote [Located Token]) lexLoc :: RealSrcLoc lexerFlags :: [ExtensionFlag] -- | Filter tokens whose span appears legitimate (start line is less than -- end line, start column is less than end column.) ofInterest :: Located Token -> Bool -- | Convert a GHC token to an interactive token (abbreviated token type) tokenToType :: Located Token -> TokenDef -- | Generate the interactive token list used by EclipseFP for syntax -- highlighting tokenTypesArbitrary :: FilePath -> String -> Bool -> [String] -> IO (Either BWNote [TokenDef]) -- | Extract occurrences based on lexing occurrences :: FilePath -> String -> Text -> Bool -> [String] -> IO (Either BWNote [TokenDef]) -- | Parse the current document, generating a TokenDef list, filtered by a -- function generateTokens :: FilePath -> String -> Bool -> [String] -> ([Located Token] -> [TokenDef]) -> ([TokenDef] -> a) -> IO (Either BWNote a) -- | Preprocess some source, returning the literate and Haskell source as -- tuple. preprocessSource :: String -> Bool -> ([TokenDef], String) data PPBehavior Continue :: Int -> PPBehavior Indent :: Int -> PPBehavior Start :: PPBehavior -- | convert a GHC error message to our note type ghcErrMsgToNote :: DynFlags -> FilePath -> ErrMsg -> BWNote -- | convert a GHC warning message to our note type ghcWarnMsgToNote :: DynFlags -> FilePath -> WarnMsg -> BWNote ghcMsgToNote :: DynFlags -> BWNoteStatus -> FilePath -> ErrMsg -> BWNote -- | remove the initial status text from a message removeStatus :: BWNoteStatus -> String -> String -- | make unqualified token mkUnqualTokenValue :: FastString -> Text -- | make qualified token: join the qualifier and the name by a dot mkQualifiedTokenValue :: FastString -> FastString -> Text -- | Make a token definition from its source location and Lexer.hs token -- type. mkTokenDef :: Located Token -> TokenDef mkTokenDef (L sp t) = -- TokenDef (mkTokenName t) (ghcSpanToLocation sp) mkTokenName :: Token -> Text tokenType :: Token -> Text dotFS :: FastString tokenValue :: Bool -> Token -> Text start :: SrcSpan -> (Int, Int) end :: SrcSpan -> (Int, Int) type AliasMap = Map ModuleName [ModuleName] ghcImportToUsage :: Text -> LImportDecl Name -> ([Usage], AliasMap) -> Ghc ([Usage], AliasMap) ghcLIEToUsage :: DynFlags -> Maybe Text -> Text -> Text -> LIE Name -> [Usage] ghcExportToUsage :: DynFlags -> Text -> Text -> AliasMap -> LIE Name -> Ghc [Usage] ghcNameToUsage :: DynFlags -> Maybe Text -> Text -> Text -> Name -> SrcSpan -> Bool -> Usage instance Data Token instance Typeable Token instance Eq PPBehavior instance Monoid (Bag a) module Language.Haskell.BuildWrapper.Cabal getCabalLibraryVersion :: String getFilesToCopy :: BuildWrapper (OpResult [FilePath]) cabalV :: BuildWrapper Verbosity -- | run cabal build cabalBuild :: Bool -> WhichCabal -> BuildWrapper (OpResult BuildResult) -- | run cabal build cabalBuild' :: Bool -> Bool -> WhichCabal -> BuildWrapper (OpResult BuildResult) -- | run cabal configure cabalConfigure :: WhichCabal -> BuildWrapper (OpResult (Maybe LocalBuildInfo)) -- | get the full path to the cabal file getCabalFile :: WhichCabal -> BuildWrapper FilePath -- | get Cabal build info, running configure if needed cabalInit :: WhichCabal -> BuildWrapper (OpResult (Maybe LocalBuildInfo)) -- | run a action with the cabal build info withCabal :: WhichCabal -> (LocalBuildInfo -> BuildWrapper a) -> BuildWrapper (OpResult (Maybe a)) -- | parse cabal error messages and transform them in notre parseCabalMessages :: FilePath -> FilePath -> String -> [BWNote] setupExe :: FilePath -> FilePath dropPrefixes :: [String] -> String -> Maybe String stripPrefixIfNeeded :: String -> String -> Maybe String -> Maybe String addCurrent :: Maybe (BWNote, [String]) -> [BWNote] -> [BWNote] cabalErrorLine :: FilePath -> FilePath -> String -> Maybe (BWNote, [String]) -- | parse messages from build parseBuildMessages :: FilePath -> FilePath -> FilePath -> String -> [BWNote] validLoc :: FilePath -> FilePath -> FilePath -> FilePath readInt :: String -> Int -> Int -- | add a message to the note makeNote :: BWNote -> [String] -> BWNote -- | get the path of a file getting compiled getBuiltPath :: String -> Maybe FilePath -- | the cabal build info for a specific component data CabalBuildInfo CabalBuildInfo :: BuildInfo -> ComponentLocalBuildInfo -> FilePath -> Bool -> [(Maybe ModuleName, FilePath)] -> CabalComponent -> CabalBuildInfo -- | the build info cbiBuildInfo :: CabalBuildInfo -> BuildInfo -- | the component local build info cbiComponentBuildInfo :: CabalBuildInfo -> ComponentLocalBuildInfo -- | the folder to build that component into cbiBuildFolder :: CabalBuildInfo -> FilePath -- | is the component the library cbiIsLibrary :: CabalBuildInfo -> Bool -- | the module name and corresponding source file for each contained -- Haskell module cbiModulePaths :: CabalBuildInfo -> [(Maybe ModuleName, FilePath)] -- | the component handle cbiComponent :: CabalBuildInfo -> CabalComponent -- | canonicalize the paths in the build info canonicalizeBuildInfo :: CabalBuildInfo -> BuildWrapper CabalBuildInfo -- | apply a function on the build info modules and paths, in a monad onModulePathsM :: Monad a => ([(Maybe ModuleName, FilePath)] -> a [(Maybe ModuleName, FilePath)]) -> CabalBuildInfo -> a CabalBuildInfo -- | apply a function on the build info modules and paths onModulePaths :: ([(Maybe ModuleName, FilePath)] -> [(Maybe ModuleName, FilePath)]) -> CabalBuildInfo -> CabalBuildInfo -- | get the build info for a given source file if a source file is in -- several component, get the first one getBuildInfo :: FilePath -> Maybe String -> BuildWrapper (OpResult (Maybe (LocalBuildInfo, CabalBuildInfo))) -- | get GHC options for a file fileGhcOptions :: (LocalBuildInfo, CabalBuildInfo) -> BuildWrapper [String] -- | get CPP options for a file fileCppOptions :: CabalBuildInfo -> [String] -- | get the cabal extensions cabalExtensions :: CabalBuildInfo -> (ModuleName, [String]) -- | get the source directory from a build info getSourceDirs :: BuildInfo -> [FilePath] -- | get all components, referencing all the files found in the source -- folders getAllFiles :: LocalBuildInfo -> BuildWrapper [CabalBuildInfo] -- | get all components, referencing only the files explicitely indicated -- in the cabal file getReferencedFiles :: LocalBuildInfo -> BuildWrapper [CabalBuildInfo] stringToModuleName :: String -> Maybe ModuleName -- | convert a ModuleName to a String moduleToString :: ModuleName -> String -- | get all components in the Cabal file cabalComponents :: BuildWrapper (OpResult [CabalComponent]) -- | get all the dependencies in the cabal file cabalDependencies :: BuildWrapper (OpResult [(FilePath, [CabalPackage])]) -- | get all dependencies from the package description and the list of -- installed packages dependencies :: PackageDescription -> [(FilePath, [InstalledPackageInfo])] -> [(FilePath, [CabalPackage])] -- | get all components from the package description cabalComponentsFromDescription :: PackageDescription -> [CabalComponent] cabalComponentFromLibrary :: Library -> CabalComponent cabalComponentFromExecutable :: Executable -> CabalComponent cabalComponentFromTestSuite :: TestSuite -> CabalComponent instance Read CabalBuildInfo instance Show CabalBuildInfo module Language.Haskell.BuildWrapper.API -- | copy all files from the project to the temporary folder synchronize :: Bool -> BuildWrapper (OpResult ([FilePath], [FilePath])) -- | synchronize one file only synchronize1 :: Bool -> FilePath -> BuildWrapper (Maybe FilePath) -- | write contents to temporary file write :: FilePath -> String -> BuildWrapper () -- | run cabal configure configure :: WhichCabal -> BuildWrapper (OpResult Bool) -- | run cabal build build :: Bool -> WhichCabal -> BuildWrapper (OpResult BuildResult) -- | generate usage information files generateUsage :: Bool -> String -> BuildWrapper (OpResult (Maybe [FilePath])) -- | build one source file in GHC build1 :: FilePath -> Maybe String -> BuildWrapper (OpResult (Maybe [NameDef])) -- | preprocess a file preproc :: BuildFlags -> FilePath -> IO String -- | get the build flags for a source file getBuildFlags :: FilePath -> Maybe String -> BuildWrapper (OpResult BuildFlags) -- | get haskell-src-exts commented AST for source file getAST :: FilePath -> Maybe String -> BuildWrapper (OpResult (Maybe (ParseResult (Module SrcSpanInfo, [Comment])))) -- | get GHC typechecked AST for source file getGHCAST :: FilePath -> Maybe String -> BuildWrapper (OpResult (Maybe TypecheckedSource)) -- | perform an action on the GHC AST withGHCAST :: FilePath -> Maybe String -> (FilePath -> FilePath -> String -> [String] -> IO a) -> BuildWrapper (OpResult (Maybe a)) withGHCAST' :: FilePath -> Maybe String -> (FilePath -> FilePath -> String -> [String] -> IO (OpResult (Maybe a))) -> BuildWrapper (OpResult (Maybe a)) -- | get outline for source file getOutline :: FilePath -> Maybe String -> BuildWrapper (OpResult OutlineResult) -- | get all occurrences of a token in the file -- -- get lexer token types for source file getTokenTypes :: FilePath -> BuildWrapper (OpResult [TokenDef]) getOccurrences :: FilePath -> String -> Maybe String -> BuildWrapper (OpResult [TokenDef]) -- | get thing at point getThingAtPoint :: FilePath -> Int -> Int -> Maybe String -> BuildWrapper (OpResult (Maybe ThingAtPoint)) -- | get all names in scope (GHC API) getNamesInScope :: FilePath -> Maybe String -> BuildWrapper (OpResult (Maybe [String])) -- | get cabal dependencies getCabalDependencies :: BuildWrapper (OpResult [(FilePath, [CabalPackage])]) -- | get cabal components getCabalComponents :: BuildWrapper (OpResult [CabalComponent])