私はAgdaのモナド型クラスをエンコードしようとしています。私はこれを遠くに持っています:なぜMonadはSet1のソートですか?
module Monad where
record Monad (M : Set → Set) : Set1 where
field
return : {A : Set} → A → M A
_⟫=_ : {A B : Set} → M A → (A → M B) → M B
だから、モナド「インスタンス」は実際に渡される関数の単なる記録です。質問:Monad
のソートSet1
はなぜですか? Set
とそれを注釈は、次のエラーを与える:
The type of the constructor does not fit in the sort of the
datatype, since Set₁ is not less or equal than Set
when checking the definition of Monad
私はMonad
がSet1
いうよりSet
であると判断していくべきである何の思考プロセス?