Canonicalise Monad instances
authorhvr <hvr@gnu.org>
Tue, 24 Nov 2015 14:44:19 +0000 (14:44 +0000)
committerhvr <hvr@gnu.org>
Tue, 24 Nov 2015 14:44:19 +0000 (14:44 +0000)
commite03cd40f414e919811a35560cd43c0509e1f779c
treeb5ee083b33ee0c0b32578d90c7363f609694287c
parent58dab5824ffbb42907ad55d1a8d86f47dbe76267
Canonicalise Monad instances

This exploits the AMP by omitting the `return` definition
and makes the code future proof.
Moreover, this makes `transformers` warning-free under
GHC 8's new `-fwarn-noncanonical-monad-instances` warning.
14 files changed:
Control/Monad/Trans/Cont.hs
Control/Monad/Trans/Error.hs
Control/Monad/Trans/Except.hs
Control/Monad/Trans/Identity.hs
Control/Monad/Trans/List.hs
Control/Monad/Trans/Maybe.hs
Control/Monad/Trans/RWS/Lazy.hs
Control/Monad/Trans/RWS/Strict.hs
Control/Monad/Trans/Reader.hs
Control/Monad/Trans/State/Lazy.hs
Control/Monad/Trans/State/Strict.hs
Control/Monad/Trans/Writer/Lazy.hs
Control/Monad/Trans/Writer/Strict.hs
Data/Functor/Product.hs