mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
generate PMCFG only for complete modules
This commit is contained in:
@@ -29,10 +29,11 @@ import Data.Maybe(fromMaybe)
|
|||||||
|
|
||||||
generatePMCFG :: Options -> FilePath -> SourceGrammar -> SourceModule -> Check SourceModule
|
generatePMCFG :: Options -> FilePath -> SourceGrammar -> SourceModule -> Check SourceModule
|
||||||
generatePMCFG opts cwd gr cmo@(cm,cmi)
|
generatePMCFG opts cwd gr cmo@(cm,cmi)
|
||||||
| isModCnc cmi = do let gr' = prependModule gr cmo
|
| mstatus cmi == MSComplete && isModCnc cmi =
|
||||||
js <- mapM (addPMCFG opts cwd gr' cmi) (Map.toList (jments cmi))
|
do let gr' = prependModule gr cmo
|
||||||
return (cm,cmi{jments = (Map.fromAscList js)})
|
js <- mapM (addPMCFG opts cwd gr' cmi) (Map.toList (jments cmi))
|
||||||
| otherwise = return cmo
|
return (cm,cmi{jments = (Map.fromAscList js)})
|
||||||
|
| otherwise = return cmo
|
||||||
|
|
||||||
addPMCFG opts cwd gr cmi (id,CncCat mty@(Just (L loc ty)) mdef mref mprn Nothing) = do
|
addPMCFG opts cwd gr cmi (id,CncCat mty@(Just (L loc ty)) mdef mref mprn Nothing) = do
|
||||||
defs <- case mdef of
|
defs <- case mdef of
|
||||||
|
|||||||
Reference in New Issue
Block a user