Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The Happy Haskell Programming library in low level.
Synopsis
- type GHCOption = String
- type Package = (PackageBaseName, PackageVersion, PackageId)
- type PackageBaseName = String
- type PackageVersion = String
- type PackageId = String
- type IncludeDir = FilePath
- data CompilerOptions = CompilerOptions {
- ghcOptions :: [GHCOption]
- includeDirs :: [IncludeDir]
- depPackages :: [Package]
- parseCabalFile :: FilePath -> IO PackageDescription
- getCompilerOptions :: [GHCOption] -> Cradle -> PackageDescription -> IO CompilerOptions
- cabalAllBuildInfo :: PackageDescription -> [BuildInfo]
- cabalDependPackages :: [BuildInfo] -> [PackageBaseName]
- cabalSourceDirs :: [BuildInfo] -> [IncludeDir]
- cabalAllTargets :: PackageDescription -> IO ([String], [String], [String], [String])
- getDynamicFlags :: IO DynFlags
- setTargetFiles :: [FilePath] -> Ghc ()
- withLogger :: Options -> (DynFlags -> DynFlags) -> Ghc () -> Ghc (Either String String)
- setNoWarningFlags :: DynFlags -> DynFlags
- setAllWarningFlags :: DynFlags -> DynFlags
Types
type Package = (PackageBaseName, PackageVersion, PackageId) Source #
A package's name, verson and id.
type PackageBaseName = String Source #
A package name.
type PackageVersion = String Source #
A package version.
type IncludeDir = FilePath Source #
An include directory for modules.
data CompilerOptions Source #
Option information for GHC
CompilerOptions | |
|
Instances
Show CompilerOptions Source # | |
Defined in Hhp.Types showsPrec :: Int -> CompilerOptions -> ShowS # show :: CompilerOptions -> String # showList :: [CompilerOptions] -> ShowS # | |
Eq CompilerOptions Source # | |
Defined in Hhp.Types (==) :: CompilerOptions -> CompilerOptions -> Bool # (/=) :: CompilerOptions -> CompilerOptions -> Bool # |
Cabal API
parseCabalFile :: FilePath -> IO PackageDescription Source #
Parsing a cabal file and returns PackageDescription
.
IOException
is thrown if parsing fails.
getCompilerOptions :: [GHCOption] -> Cradle -> PackageDescription -> IO CompilerOptions Source #
Getting necessary CompilerOptions
from three information sources.
cabalAllBuildInfo :: PackageDescription -> [BuildInfo] Source #
Extracting all BuildInfo
for libraries, executables, and tests.
cabalDependPackages :: [BuildInfo] -> [PackageBaseName] Source #
Extracting package names of dependency.
cabalSourceDirs :: [BuildInfo] -> [IncludeDir] Source #
Extracting include directories for modules.
cabalAllTargets :: PackageDescription -> IO ([String], [String], [String], [String]) Source #
Extracting all Module
FilePath
s for libraries, executables,
tests and benchmarks.
IO
Targets
setTargetFiles :: [FilePath] -> Ghc () Source #
Set the files as targets and load them.