projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove datatype contexts from base
[ghc-base.git]
/
Data
/
Dynamic.hs
diff --git
a/Data/Dynamic.hs
b/Data/Dynamic.hs
index
7466897
..
df64c38
100644
(file)
--- a/
Data/Dynamic.hs
+++ b/
Data/Dynamic.hs
@@
-1,4
+1,8
@@
-{-# OPTIONS_GHC -XNoImplicitPrelude #-}
+{-# LANGUAGE CPP, NoImplicitPrelude #-}
+#ifdef __GLASGOW_HASKELL__
+{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
+#endif
+
-----------------------------------------------------------------------------
-- |
-- Module : Data.Dynamic
-----------------------------------------------------------------------------
-- |
-- Module : Data.Dynamic
@@
-47,8
+51,7
@@
import Unsafe.Coerce
#ifdef __GLASGOW_HASKELL__
import GHC.Base
import GHC.Show
#ifdef __GLASGOW_HASKELL__
import GHC.Base
import GHC.Show
-import GHC.Err
-import GHC.Num
+import GHC.Exception
#endif
#ifdef __HUGS__
#endif
#ifdef __HUGS__
@@
-94,6
+97,11
@@
instance Show Dynamic where
showString ">>"
#ifdef __GLASGOW_HASKELL__
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.
--
type Obj = Any
-- Use GHC's primitive 'Any' type to hold the dynamically typed value.
--