diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2013-09-15 23:05:05 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2013-09-17 09:54:07 +0200 |
commit | 0f5eae0232a86ec57d841a83e6929361e2751270 (patch) | |
tree | 7cc7b87fce8238cd9ff6b65fb0c37f515191aa6e /libraries/base/Data/Dynamic.hs | |
parent | 43ece172e7045d5ba633be6193f3e908eaa81f00 (diff) | |
download | haskell-0f5eae0232a86ec57d841a83e6929361e2751270.tar.gz |
Constant-fold `__GLASGOW_HASKELL__` CPP conditionals
Now that HUGS and NHC specific code has been removed, this commit "folds"
the now redundant `#if((n)def)`s containing `__GLASGOW_HASKELL__`. This
renders `base` officially GHC only.
This commit also removes redundant `{-# LANGUAGE CPP #-}`.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Diffstat (limited to 'libraries/base/Data/Dynamic.hs')
-rw-r--r-- | libraries/base/Data/Dynamic.hs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/libraries/base/Data/Dynamic.hs b/libraries/base/Data/Dynamic.hs index 4492dd39bb..ccf78f35d0 100644 --- a/libraries/base/Data/Dynamic.hs +++ b/libraries/base/Data/Dynamic.hs @@ -1,8 +1,6 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} -#ifdef __GLASGOW_HASKELL__ {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} -#endif ----------------------------------------------------------------------------- -- | @@ -49,11 +47,9 @@ import Data.Typeable import Data.Maybe import Unsafe.Coerce -#ifdef __GLASGOW_HASKELL__ import GHC.Base import GHC.Show import GHC.Exception -#endif #include "Typeable.h" @@ -84,12 +80,9 @@ instance Show Dynamic where showsPrec 0 t . showString ">>" -#ifdef __GLASGOW_HASKELL__ -- here so that it isn't an orphan: instance Exception Dynamic -#endif -#ifdef __GLASGOW_HASKELL__ type Obj = Any -- Use GHC's primitive 'Any' type to hold the dynamically typed value. -- @@ -98,9 +91,6 @@ type Obj = Any -- when evaluating it, and this will go wrong if the object is really a -- function. Using Any forces GHC to use -- a fallback convention for evaluating it that works for all types. -#else -data Obj = Obj -#endif -- | Converts an arbitrary value into an object of type 'Dynamic'. -- |