mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-29 14:32:51 -06:00
Consistenly use SourceGrammar instead of [SourceModule] when calling compiler passes
This commit is contained in:
@@ -43,13 +43,13 @@ import Control.Exception
|
||||
----------------------------------------------------------------------
|
||||
-- main conversion function
|
||||
|
||||
generatePMCFG :: Options -> [SourceModule] -> SourceModule -> IO SourceModule
|
||||
generatePMCFG opts mos cmo@(cm,cmi) = do
|
||||
generatePMCFG :: Options -> SourceGrammar -> SourceModule -> IO SourceModule
|
||||
generatePMCFG opts sgr cmo@(cm,cmi) = do
|
||||
(seqs,js) <- mapAccumWithKeyM (addPMCFG opts gr am cm) Map.empty (jments cmi)
|
||||
when (verbAtLeast opts Verbose) $ hPutStrLn stderr ""
|
||||
return (cm,cmi{mseqs = Just (mkSetArray seqs), jments = js})
|
||||
where
|
||||
gr = mGrammar (cmo:mos)
|
||||
gr = prependModule sgr cmo
|
||||
MTConcrete am = mtype cmi
|
||||
|
||||
mapAccumWithKeyM :: (Monad m, Ord k) => (a -> k -> b -> m (a,c)) -> a
|
||||
|
||||
Reference in New Issue
Block a user