You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: assets/19.md
+10-11
Original file line number
Diff line number
Diff line change
@@ -104,37 +104,36 @@ instance Monad IO -- Defined in ‘GHC.Base’
104
104
105
105
##### GHCの言語拡張`TypeApplications`で、分かりやすく見てみる
106
106
107
-
`Monad`のことを一旦忘れるために、便利なGHCの言語拡張を有効にする。
107
+
`>>`は`Monad`型クラスのインスタンス全般に対して使える関数で、`IO`型も`Monad`型クラスのインスタンスなので`>>`が使えることはここまででお伝えしたとおりです。とは言ったものの、`>>`のことをよりよく理解する上で、`Monad m => m a -> m b -> m b`という型は少々抽象的で分かりづらく感じられるかも知れません。そこで、`TypeApplications`というGHCの言語拡張を使うことで、`IO`専用の`>>`を作ってみましょう。`Monad`のことを意識しなくて良い分、より分かりやすくなるはずです。
0 commit comments