PS

Monad transformer

Inhabited set

空でない集合のこと。

Pointed set

集合とその要素のペア:

  •  (S, s \in S)

からなる代数的構造。このとき、 S はinhabited。

Pointed object

  • category:  \mathcal{C}
  • terminal  \mathcal{C} -object:  1

について、

  •  \mathcal{C}-object:  X
  •  \mathcal{C}-morphism:  b : 1 \rightarrow X

のペア(からなる代数的構造)  (X, b)pointed objectという。

Pointed endofunctor

特に、

のときのpointed object、つまり、

  • endofunctor:  F : \mathcal{B} \rightarrow \mathcal{B}
  • natural transformation:  \rho : 1 _ \mathcal{B} \rightarrow F

のペアをpointed endofuctorという。*2

Monad transformer

Monad morphismの族:

  •  ( \tau _ m : m \rightarrow T _ m ) _ { m \in \mathcal{Mnd}(\mathcal{Hask}) }

のこと。

Pointed endofunctor of monads

特に、上の  T がendofunctor:

  •  T : \mathcal{Mnd}(\mathcal{Hask}) \rightarrow \mathcal{Mnd}(\mathcal{Hask})

で、

  •  (\tau _ m) _m

がnaturalのとき*3 (T, \tau) はpointed endofunctorになる。*4

Haskellにて

Hackage: mmorph: Monad morphismsというのがあって

  •  t := (T, \tau)

は、それぞれMFunctor tMonadTrans tに対応する(と思う)。

参考文献

*1:endofunctor category

*2:monadもpointed endofunctorの一種

*3:実際はfreely natural、のはず

*4:有名どころではContTを除いてそうなる