forked from GitHub/gf-core
now we can load PGF files as precompiled modules
This commit is contained in:
@@ -247,6 +247,7 @@ pgfCommands = Map.fromList [
|
||||
],
|
||||
options = [
|
||||
("retain","retain operations (used for cc command)"),
|
||||
("resource","the grammar is loaded as a resource to a precompiled PGF"),
|
||||
("src", "force compilation from source"),
|
||||
("v", "be verbose - show intermediate status information")
|
||||
],
|
||||
|
||||
@@ -79,8 +79,8 @@ importPGF opts (Just pgf) f = fmap Just (modifyPGF pgf (mergePGF f) `catc
|
||||
readPGF f
|
||||
else throwIO e))
|
||||
|
||||
importSource :: Options -> [FilePath] -> IO (ModuleName,SourceGrammar)
|
||||
importSource opts files = fmap snd (batchCompile opts files)
|
||||
importSource :: Options -> Maybe PGF -> [FilePath] -> IO (ModuleName,SourceGrammar)
|
||||
importSource opts mb_pgf files = fmap snd (batchCompile opts mb_pgf files)
|
||||
|
||||
-- for different cf formats
|
||||
importCF opts files get convert = impCF
|
||||
|
||||
Reference in New Issue
Block a user