X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FDynamic.hs;h=b83bbfa89c649ce0da0636776960eaccaf242b41;hb=41e8fba828acbae1751628af50849f5352b27873;hp=7466897827101f5d3f482e7c4e63aed963adb172;hpb=10de2c656f74562b662c22928be85e1b3ccda796;p=ghc-base.git diff --git a/Data/Dynamic.hs b/Data/Dynamic.hs index 7466897..b83bbfa 100644 --- a/Data/Dynamic.hs +++ b/Data/Dynamic.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Dynamic @@ -47,8 +48,7 @@ import Unsafe.Coerce #ifdef __GLASGOW_HASKELL__ import GHC.Base import GHC.Show -import GHC.Err -import GHC.Num +import GHC.Exception #endif #ifdef __HUGS__ @@ -94,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. --