In type theory there are type forming rules, e.g., for product:
judging $$ \Gamma \vdash A : \text{Type} \ \ \Gamma \vdash B : \text{Type} $$ allows us to judge $$ \Gamma \vdash A \times B : \text{Type} $$
I would like a set of type forming rules which would encapsulate the idea of "a monad on Type". It would consist probably of a morphism $T : \text{Type} \rightarrow \text{Type}$, and morphisms $TT \rightarrow T$, $\text{Id} \rightarrow T$ (with whatever type forming rules are necessary to make sense of this). But the coherence is tripping me up, and I cannot seem to find this written anywhere.
Having monads like this would be nice, since one could then do modal type theory, and I would have a better understanding of how haskell translates to formal type theory.
This is a nice idea that was investigated 30 years ago by Moggi:
Moggi, Eugenio (1991). Notions of Computation and Monads. Information and Computation. 93 (1): 55–92. doi:10.1016/0890-5401(91)90052-4