diff options
author | Austin Seipp <austin@well-typed.com> | 2014-04-22 06:09:40 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-04-22 06:09:40 -0500 |
commit | 88c9403264950326e39a05f262bbbb069cf12977 (patch) | |
tree | 84821fe0ccac02131a7685eeb9224e366a638763 /libraries/base/Data/Proxy.hs | |
parent | 33e585d6eacae19e83862a05b650373b536095fa (diff) | |
download | haskell-wip/amp.tar.gz |
Make Applicative a superclass of Monadwip/amp
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'libraries/base/Data/Proxy.hs')
-rw-r--r-- | libraries/base/Data/Proxy.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libraries/base/Data/Proxy.hs b/libraries/base/Data/Proxy.hs index ab89066cfa..38a43b0b0f 100644 --- a/libraries/base/Data/Proxy.hs +++ b/libraries/base/Data/Proxy.hs @@ -69,10 +69,21 @@ instance Bounded (Proxy s) where minBound = Proxy maxBound = Proxy +instance Monoid (Proxy s) where + mempty = Proxy + mappend _ _ = Proxy + mconcat _ = Proxy + instance Functor Proxy where fmap _ _ = Proxy {-# INLINE fmap #-} +instance Applicative Proxy where + pure _ = Proxy + {-# INLINE pure #-} + _ <*> _ = Proxy + {-# INLINE (<*>) #-} + instance Monad Proxy where return _ = Proxy {-# INLINE return #-} |