Als Lernübung, ich versuche, eine newtype zu definieren als Inhaber von Funktionen zu dienen, die Show
-able Werte Eff
ects umwandeln kann, das heißt:Unifying Satzart
newtype ShEff a = ShEff (forall eff. Show a => a -> Eff eff Unit)
Dies ist jedoch:
f :: forall a. ShEff a
f = ShEff logShow
nicht mit diesem Fehler kompilieren:
Could not match type
(console :: CONSOLE
| t2
)
with type
eff1
while trying to match type Eff
(console :: CONSOLE
| t2
)
with type Eff eff1
while checking that expression logShow
has type t0 -> Eff eff1 Unit
in value declaration f
können Sie mir zeigen im Rigg Richtung?
Ok, ich hatte das dann rückwärts, danke. –