src/Self/Feeling.hs:80:1-20: error:
• Couldn't match type ‘p’ with ‘DMap.DSum f1 Identity’
because type variable ‘f1’ would escape its scope
This (rigid, skolem) type variable is bound by
an expression type signature:
forall (f1 :: * -> *) (r1 :: EffectRow). DListLang f1
(Sem r1) ()
at src/Self/Feeling.hs:80:1-20
Expected type: DSum f1 Identity
Actual type: p
• In the first argument of ‘AddX’, namely ‘x_a6wcj’
In the first argument of ‘Polysemy.Internal.send’, namely
‘(AddX x_a6wcj :: DListLang f (Sem r) ())’
In the expression:
Polysemy.Internal.send (AddX x_a6wcj :: DListLang f (Sem
r) ())
• Relevant bindings include
x_a6wcj :: p (bound at src/Self/Feeling.hs:80:1)
addX :: p -> Sem r () (bound at src/Self/Feeling.hs:80:1)
|
80 | makeSem_ ''DListLang
| ^^^^^^^^^^^^^^^^^^^^
For this type,
the compiler throws,
Is there a limitation here?
Oh n/m.
makeSem
works.I'm putting this here since I think it will be quick:
Can someone tell me why I'm getting this error?
With this code
Had to enable Polykinds!
@Bolt
PolyKinds
Yes thank you!!
Or use explicit annotations on
m
anda
Or write
data Console :: Effect where ..