Safe Haskell | None |
---|---|
Language | Haskell2010 |
Mostly effectful functions to assemble artifacts.
- assemble :: ArtifactGenerator -> B9 [AssembledArtifact]
- parseArtifactGenerator :: ArtifactGenerator -> CGParser ()
- withArtifactSources :: [ArtifactSource] -> CGParser () -> CGParser ()
- withBindings :: [(String, String)] -> CGParser () -> CGParser ()
- addBindings :: [(String, String)] -> CGEnv -> CGEnv
- withXBindings :: [(String, [String])] -> CGParser () -> CGParser ()
- eachBindingSetT :: ArtifactGenerator -> [String] -> [[String]] -> CGParser [[(String, String)]]
- eachBindingSet :: ArtifactGenerator -> [(String, [String])] -> CGParser [[(String, String)]]
- writeInstanceGenerator :: InstanceId -> ArtifactAssembly -> CGParser ()
- newtype CGParser a = CGParser {
- runCGParser :: WriterT [InstanceGenerator CGEnv] (ReaderT CGEnv (Either CGError)) a
- data CGEnv = CGEnv {
- agEnv :: [(String, String)]
- agSources :: [ArtifactSource]
- data InstanceGenerator e = IG InstanceId e ArtifactAssembly
- newtype CGError = CGError String
- cgError :: String -> CGParser a
- execCGParser :: CGParser () -> CGEnv -> Either CGError [InstanceGenerator CGEnv]
- execIGEnv :: InstanceGenerator CGEnv -> Either String (InstanceGenerator [SourceGenerator])
- substAssembly :: [(String, String)] -> ArtifactAssembly -> ArtifactAssembly
- toSourceGen :: [(String, String)] -> ArtifactSource -> Either String [SourceGenerator]
- createAssembledArtifacts :: [InstanceGenerator [SourceGenerator]] -> B9 [AssembledArtifact]
- generateSources :: FilePath -> InstanceGenerator [SourceGenerator] -> B9 (InstanceGenerator FilePath)
- createTargets :: InstanceGenerator FilePath -> B9 AssembledArtifact
- generateUniqueIID :: InstanceId -> B9 InstanceId
- generateSourceTo :: FilePath -> SourceGenerator -> B9 ()
- sgReadSourceFile :: [(String, String)] -> SourceFile -> B9 ByteString
- sgChangePerm :: FilePath -> SGPerm -> B9 ()
- data SourceGenerator = SGConcat [(String, String)] SGSource SGPerm FilePath
- data SGSource
- data SGType
- data SGPerm
- sgGetFroms :: SourceGenerator -> [SourceFile]
- setSGPerm :: Int -> Int -> Int -> SourceGenerator -> Either String SourceGenerator
- setSGFromDirectory :: FilePath -> SourceGenerator -> SourceGenerator
- setSGToDirectory :: FilePath -> SourceGenerator -> SourceGenerator
- createTarget :: InstanceId -> FilePath -> ArtifactAssembly -> B9 [ArtifactTarget]
Documentation
assemble :: ArtifactGenerator -> B9 [AssembledArtifact] Source
Run an artifact generator to produce the artifacts.
withArtifactSources :: [ArtifactSource] -> CGParser () -> CGParser () Source
eachBindingSetT :: ArtifactGenerator -> [String] -> [[String]] -> CGParser [[(String, String)]] Source
eachBindingSet :: ArtifactGenerator -> [(String, [String])] -> CGParser [[(String, String)]] Source
writeInstanceGenerator :: InstanceId -> ArtifactAssembly -> CGParser () Source
Monad for creating Instance generators.
CGParser | |
|
data InstanceGenerator e Source
Eq e => Eq (InstanceGenerator e) | |
Data e => Data (InstanceGenerator e) | |
Read e => Read (InstanceGenerator e) | |
Show e => Show (InstanceGenerator e) | |
MonadWriter [InstanceGenerator CGEnv] CGParser | |
Typeable (* -> *) InstanceGenerator |
execCGParser :: CGParser () -> CGEnv -> Either CGError [InstanceGenerator CGEnv] Source
substAssembly :: [(String, String)] -> ArtifactAssembly -> ArtifactAssembly Source
toSourceGen :: [(String, String)] -> ArtifactSource -> Either String [SourceGenerator] Source
generateSources :: FilePath -> InstanceGenerator [SourceGenerator] -> B9 (InstanceGenerator FilePath) Source
generateSourceTo :: FilePath -> SourceGenerator -> B9 () Source
sgReadSourceFile :: [(String, String)] -> SourceFile -> B9 ByteString Source
sgChangePerm :: FilePath -> SGPerm -> B9 () Source
data SourceGenerator Source
Internal data type simplifying the rather complex source generation by
bioling down ArtifactSource
s to a flat list of uniform SourceGenerator
s.
sgGetFroms :: SourceGenerator -> [SourceFile] Source
setSGPerm :: Int -> Int -> Int -> SourceGenerator -> Either String SourceGenerator Source
createTarget :: InstanceId -> FilePath -> ArtifactAssembly -> B9 [ArtifactTarget] Source
Create the actual target, either just a mountpoint, or an ISO or VFAT image.