From c2bb8f57dae0c99576de544b953e0322d0b9af05 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Tue, 21 Jul 2009 09:38:54 +0000 Subject: [PATCH] move "instance Exception Dynamic" so it isn't an orphan --- Control/Exception/Base.hs | 2 -- Data/Dynamic.hs | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Control/Exception/Base.hs b/Control/Exception/Base.hs index 06c5390..4b314ed 100644 --- a/Control/Exception/Base.hs +++ b/Control/Exception/Base.hs @@ -691,8 +691,6 @@ instance Exception NestedAtomically ----- -instance Exception Dynamic - #endif /* __GLASGOW_HASKELL__ || __HUGS__ */ #ifdef __GLASGOW_HASKELL__ diff --git a/Data/Dynamic.hs b/Data/Dynamic.hs index 12bf1c4..458497b 100644 --- a/Data/Dynamic.hs +++ b/Data/Dynamic.hs @@ -48,6 +48,7 @@ import Unsafe.Coerce import GHC.Base import GHC.Show import GHC.Num +import GHC.Exception #endif #ifdef __HUGS__ @@ -93,6 +94,11 @@ instance Show Dynamic where 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. -- -- 1.7.10.4