diff --git a/src/compiler/GF/Compile/Compute/Concrete.hs b/src/compiler/GF/Compile/Compute/Concrete.hs index d40455228..d02d90203 100644 --- a/src/compiler/GF/Compile/Compute/Concrete.hs +++ b/src/compiler/GF/Compile/Compute/Concrete.hs @@ -641,7 +641,7 @@ getVariables = EvalM $ \gr k mt r -> do Ok ts -> length ts Bad msg -> error msg params <- metas2params gr tnks - return ((i,range):params) + return ((i-1,range):params) _ -> metas2params gr tnks getRef tnk = EvalM $ \gr k mt r -> readSTRef tnk >>= \st -> k st mt r diff --git a/src/compiler/GF/Compile/GeneratePMCFG.hs b/src/compiler/GF/Compile/GeneratePMCFG.hs index 746717adc..6efe59fe1 100644 --- a/src/compiler/GF/Compile/GeneratePMCFG.hs +++ b/src/compiler/GF/Compile/GeneratePMCFG.hs @@ -165,7 +165,7 @@ param2int (VMeta tnk _ _) = do Evaluated v -> param2int v Narrowing j ty -> do let QC q = valTypeCnc ty (_,ResParam _ (Just (_,cnt))) <- getInfo q - return (0,[(1,j)],cnt) + return (0,[(1,j-1)],cnt) param2int v = do t <- value2term 0 v evalError ("the parameter:" <+> ppTerm Unqualified 0 t $$ "cannot be evaluated at compile time.")