Ich bin auf die Verwendung von :>>=
in der Haxl Bibliothek, die ich verwende, gestoßen. Ich bin mir nicht sicher, wie sich das vom Operator >>=
unterscheidet?Monadische Operationen innerhalb des Datentyps?
Zum Beispiel:
data MyType a = MyType a :>>= (a -> Int)
Was genau ist dieser Vorgang in MyType
tun?
Dies ist der Kontext es in Haxl ist mit:
newtype GenHaxl u a = GenHaxl { unHaxl :: Env u -> IORef (RequestStore u) -> IO (Result u a) } --|| u is the env, a is the result
data Result u a
= Done a
| Throw SomeException
| Blocked (Cont u a)
data Cont u a
= Cont (GenHaxl u a)
| forall b. Cont u b :>>= (b -> GenHaxl u a)
| forall b. (Cont u (b -> a)) :<*> (Cont u b)
| forall b. (b -> a) :<$> (Cont u b)
@ jd823592 Haxl durch Interpretieren Bibliothek bereits in Frage erwähnt – Shersh
Tut mir leid, ich bin ein Idiot, ich missverstanden – jakubdaniel