From 15e3ca9acd5b38031670cbc6eb4068b8dff1190a Mon Sep 17 00:00:00 2001 From: krangelov Date: Fri, 8 Oct 2021 11:56:28 +0200 Subject: [PATCH] use prependModule to make the current module available --- src/compiler/GF/Compile/GeneratePMCFG.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/GF/Compile/GeneratePMCFG.hs b/src/compiler/GF/Compile/GeneratePMCFG.hs index 1e74b80a0..da47e074a 100644 --- a/src/compiler/GF/Compile/GeneratePMCFG.hs +++ b/src/compiler/GF/Compile/GeneratePMCFG.hs @@ -23,7 +23,8 @@ import qualified Data.Map.Strict as Map generatePMCFG :: Options -> SourceGrammar -> SourceModule -> Check SourceModule generatePMCFG opts gr cmo@(cm,cmi) = do - js <- mapM (addPMCFG opts gr) (Map.toList (jments cmi)) + let gr' = prependModule gr cmo + js <- mapM (addPMCFG opts gr') (Map.toList (jments cmi)) return (cm,cmi{jments = (Map.fromAscList js)}) addPMCFG opts gr (id,CncFun mty@(Just (cat,ctxt,val)) mlin@(Just (L loc term)) mprn Nothing) = do