mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-09-12 21:36:01 -06:00
of by one error when counting terms of type Ints n
This commit is contained in:
@@ -207,7 +207,7 @@ allParamValues gr ptyp =
|
|||||||
countParamValues :: ErrorMonad m => Grammar -> Type -> m Int
|
countParamValues :: ErrorMonad m => Grammar -> Type -> m Int
|
||||||
countParamValues gr ptyp =
|
countParamValues gr ptyp =
|
||||||
case ptyp of
|
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
|
QC c -> do (_,info) <- lookupOrigInfo gr c
|
||||||
case info of
|
case info of
|
||||||
ResParam _ (Just (_,cnt)) -> return cnt
|
ResParam _ (Just (_,cnt)) -> return cnt
|
||||||
|
|||||||
Reference in New Issue
Block a user