1 Monad_Return (M:* -> *) (X:*) = X -> M X
2 Monad_Join (M:* -> *) (X:*) = M (M X) -> M X
3 Monad_Bind (M:* -> *) (X:*) (Y:*) = M X -> (X -> M Y) -> M Y
7 = (return:∀(X:*) -> Monad_Return M X)
8 -> (bind:∀(X:*) -> ∀(Y:*) -> Monad_Bind M X Y)
12 = (Data:*) -> Monad_Class M Data -> Data
15 = Monotype (Monad_Polytype M)
19 (return:∀(X:*) -> Monad_Return M X)
20 (bind:∀(X:*) -> ∀(Y:*) -> Monad_Bind M X Y)
22 = monotype (Monad_Polytype M)
23 (λ(Data:*) (monad_class:Monad_Class M Data) ->
24 monad_class return bind)
27 (monad_class:Monad_Class M Data)
30 = polytype (Monad_Polytype M) monad Data monad_class
33 (M:* -> *) (monad:Monad M) (X:*)
35 = unMonad M (Monad_Return M X)
36 (λ(return:∀(X:*) -> Monad_Return M X)
37 (bind:∀(X:*) -> ∀(Y:*) -> Monad_Bind M X Y)
41 (M:* -> *) (monad:Monad M) (X:*) (Y:*)
43 = unMonad M (Monad_Bind M X Y)
44 (λ(return:∀(X:*) -> Monad_Return M X)
45 (bind:∀(X:*) -> ∀(Y:*) -> Monad_Bind M X Y)
49 (M:* -> *) (monad:Monad M) (X:*)
52 Monad_bind M monad (M X) X m (λ(x:M X) -> x)