> cabal configure --with-ghc=ghc-9.2
...
> cabal build
...
src/Data/Replicator/Linear/Internal.hs:169:18: error:
• Could not deduce (Elim (Arity b (a %1 -> f)) a b f1)
arising from a use of ‘elim'’
from the context: (n ~ Arity b (a %1 -> f1), Elim (n - 1) a b f1)
bound by the instance declaration
at src/Data/Replicator/Linear/Internal.hs:166:31-101
The type variable ‘f’ is ambiguous
Relevant bindings include
r' :: Replicator a
(bound at src/Data/Replicator/Linear/Internal.hs:169:11)
a :: a (bound at src/Data/Replicator/Linear/Internal.hs:169:8)
r :: Replicator a
(bound at src/Data/Replicator/Linear/Internal.hs:167:11)
g :: a %1 -> f1
(bound at src/Data/Replicator/Linear/Internal.hs:167:9)
elim' :: (a %1 -> f1) %1 -> Replicator a %1 -> b
(bound at src/Data/Replicator/Linear/Internal.hs:167:3)
• In the expression: elim' (g a) r'
In a case alternative: (a, r') -> elim' (g a) r'
In the second argument of ‘(&)’, namely
‘\case (a, r') -> elim' (g a) r'’
|
169 | (a, r') -> elim' (g a) r'
| ^^^^^
...
Describe the bug
Environment
Additional context
Add any other context about the problem here.