of by one error when counting terms of type Ints n

This commit is contained in:
Krasimir Angelov
2026-05-22 15:43:41 +02:00
parent 8f4403b745
commit a931b58dd9
+1 -1
View File
@@ -207,7 +207,7 @@ allParamValues gr ptyp =
countParamValues :: ErrorMonad m => Grammar -> Type -> m Int
countParamValues gr ptyp =
case ptyp of
_ | Just n <- isTypeInts ptyp -> return (fromIntegral n)
_ | Just n <- isTypeInts ptyp -> return (fromIntegral n+1)
QC c -> do (_,info) <- lookupOrigInfo gr c
case info of
ResParam _ (Just (_,cnt)) -> return cnt