mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-10-28 01:13:18 -06:00
now we can load PGF files as precompiled modules
This commit is contained in:
1 parent
021e271f29
commit
c94d0f31bc
19 files changed
+161
-99
No files matched your search
@@ -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