X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FMonoid.hs;h=b3233ba13e071d09d1d7a11f049b08f11074f909;hb=27aaa04d21d82a77b4eca92883de3bb5b24a212c;hp=65e3bb76d770999e349df511b9303765bbb06d8b;hpb=4d9023e9281493aea632196980543dfdedfd9910;p=ghc-base.git diff --git a/Data/Monoid.hs b/Data/Monoid.hs index 65e3bb7..b3233ba 100644 --- a/Data/Monoid.hs +++ b/Data/Monoid.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -XNoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Monoid @@ -30,7 +31,17 @@ module Data.Monoid ( Last(..) ) where +-- Push down the module in the dependency hierarchy. +#if defined(__GLASGOW_HASKELL__) +import GHC.Base hiding (Any) +import GHC.Enum +import GHC.Num +import GHC.Read +import GHC.Show +import Data.Maybe +#else import Prelude +#endif {- -- just for testing @@ -42,11 +53,11 @@ import Test.QuickCheck -- | The class of monoids (types with an associative binary operation that -- has an identity). Instances should satisfy the following laws: -- --- * @mempty `mappend` x = x@ +-- * @mappend mempty x = x@ -- --- * @x `mappend` mempty = x@ +-- * @mappend x mempty = x@ -- --- * @x `mappend` (y `mappend` z) = (x `mappend` y) `mappend` z@ +-- * @mappend x (mappend y z) = mappend (mappend x y) z@ -- -- * @mconcat = 'foldr' mappend mempty@ --