diff options
author | Fumiaki Kinoshita <fumiexcel@gmail.com> | 2015-03-25 13:30:25 +0900 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2015-03-25 14:47:22 +0100 |
commit | 9db005a444722e31aca1956b058e069bcf3cacbd (patch) | |
tree | 47c433696d584c5a3138eff13e638832027d30c1 /testsuite/tests/ghci | |
parent | 33cfa5ff9db4e7886b3e7c2eed5ac1c75436bc4c (diff) | |
download | haskell-9db005a444722e31aca1956b058e069bcf3cacbd.tar.gz |
Add Monad instance for `((,) a)` (#10190)
This was proposed a couple of times in the past, e.g.
- https://mail.haskell.org/pipermail/libraries/2011-November/017153.html
- https://mail.haskell.org/pipermail/libraries/2013-July/020446.html
but its implementation had been blocked by the fact that `Monoid` wasn't
in scope where the `Monad` class was defined. Since the AMP/FTP restructuring
this is no longer the case.
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r-- | testsuite/tests/ghci/scripts/T7627.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci011.stdout | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T7627.stdout b/testsuite/tests/ghci/scripts/T7627.stdout index 27135662d4..158672cc2a 100644 --- a/testsuite/tests/ghci/scripts/T7627.stdout +++ b/testsuite/tests/ghci/scripts/T7627.stdout @@ -15,6 +15,7 @@ data (,) a b = (,) a b -- Defined in ‘GHC.Tuple’ instance (Bounded a, Bounded b) => Bounded (a, b) -- Defined in ‘GHC.Enum’ instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‘GHC.Classes’ +instance Monoid a => Monad ((,) a) -- Defined in ‘GHC.Base’ instance Functor ((,) a) -- Defined in ‘GHC.Base’ instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‘GHC.Classes’ instance (Read a, Read b) => Read (a, b) -- Defined in ‘GHC.Read’ diff --git a/testsuite/tests/ghci/scripts/ghci011.stdout b/testsuite/tests/ghci/scripts/ghci011.stdout index a608f079b5..8042757541 100644 --- a/testsuite/tests/ghci/scripts/ghci011.stdout +++ b/testsuite/tests/ghci/scripts/ghci011.stdout @@ -21,6 +21,7 @@ data (,) a b = (,) a b -- Defined in ‘GHC.Tuple’ instance (Bounded a, Bounded b) => Bounded (a, b) -- Defined in ‘GHC.Enum’ instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‘GHC.Classes’ +instance Monoid a => Monad ((,) a) -- Defined in ‘GHC.Base’ instance Functor ((,) a) -- Defined in ‘GHC.Base’ instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‘GHC.Classes’ instance (Read a, Read b) => Read (a, b) -- Defined in ‘GHC.Read’ |