diff options
author | Austin Seipp <austin@well-typed.com> | 2014-04-22 06:09:40 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-09-09 08:13:27 -0500 |
commit | d94de87252d0fe2ae97341d186b03a2fbe136b04 (patch) | |
tree | 1cac19f2786b1d8a1626886cd6373946a3a276b0 /testsuite/tests/indexed-types/should_fail/T4485.hs | |
parent | fdfe6c0e50001add357475a1a3a7627243a28a70 (diff) | |
download | haskell-d94de87252d0fe2ae97341d186b03a2fbe136b04.tar.gz |
Make Applicative a superclass of Monad
Summary:
This includes pretty much all the changes needed to make `Applicative`
a superclass of `Monad` finally. There's mostly reshuffling in the
interests of avoid orphans and boot files, but luckily we can resolve
all of them, pretty much. The only catch was that
Alternative/MonadPlus also had to go into Prelude to avoid this.
As a result, we must update the hsc2hs and haddock submodules.
Signed-off-by: Austin Seipp <austin@well-typed.com>
Test Plan: Build things, they might not explode horribly.
Reviewers: hvr, simonmar
Subscribers: simonmar
Differential Revision: https://phabricator.haskell.org/D13
Diffstat (limited to 'testsuite/tests/indexed-types/should_fail/T4485.hs')
-rw-r--r-- | testsuite/tests/indexed-types/should_fail/T4485.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T4485.hs b/testsuite/tests/indexed-types/should_fail/T4485.hs index d7d4730362..afea7e6c41 100644 --- a/testsuite/tests/indexed-types/should_fail/T4485.hs +++ b/testsuite/tests/indexed-types/should_fail/T4485.hs @@ -15,7 +15,7 @@ module XMLGenerator where newtype XMLGenT m a = XMLGenT (m a) - deriving (Functor, Monad) + deriving (Functor, Applicative, Monad) class Monad m => XMLGen m where type XML m @@ -31,11 +31,15 @@ instance {-# OVERLAPPABLE #-} (XMLGen m, XML m ~ x) => EmbedAsChild m x data Xml = Xml data IdentityT m a = IdentityT (m a) +instance Functor (IdentityT m) +instance Applicative (IdentityT m) instance Monad (IdentityT m) instance XMLGen (IdentityT m) where type XML (IdentityT m) = Xml data Identity a = Identity a +instance Functor Identity +instance Applicative Identity instance Monad Identity instance {-# OVERLAPPING #-} EmbedAsChild (IdentityT IO) (XMLGenT Identity ()) |