X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FDynamic.hs;h=df64c389bf786a1a4a0d96a8392cc3e70ae54f9d;hb=HEAD;hp=12bf1c493afe73d4f5db4b68940c1f45b9b50deb;hpb=8afc9fecd586d3c4f7ef9c69fb1686a79e5f441d;p=ghc-base.git diff --git a/Data/Dynamic.hs b/Data/Dynamic.hs index 12bf1c4..df64c38 100644 --- 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 @@ -47,7 +51,7 @@ import Unsafe.Coerce #ifdef __GLASGOW_HASKELL__ import GHC.Base import GHC.Show -import GHC.Num +import GHC.Exception #endif #ifdef __HUGS__ @@ -93,6 +97,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. --