From c6bc0c686dded47980345804c384b05a7f0995f2 Mon Sep 17 00:00:00 2001 From: David Waern Date: Wed, 13 Aug 2008 21:45:29 +0000 Subject: Follow extensible exceptions changes --- src/Haddock/Exception.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Haddock/Exception.hs') diff --git a/src/Haddock/Exception.hs b/src/Haddock/Exception.hs index 0ce002b0..b537127c 100644 --- a/src/Haddock/Exception.hs +++ b/src/Haddock/Exception.hs @@ -15,19 +15,19 @@ module Haddock.Exception ( import Data.Typeable - - --- TODO: change this to test for base version instead -#if __GLASGOW_HASKELL__ >= 609 -import Control.OldException -#else import Control.Exception -#endif data HaddockException = HaddockException String deriving Typeable -throwE str = throwDyn (HaddockException str) instance Show HaddockException where show (HaddockException str) = str + + +#if __GLASGOW_HASKELL__ >= 609 +instance Exception HaddockException +throwE str = throw (HaddockException str) +#else +throwE str = throwDyn (HaddockException str) +#endif -- cgit v1.2.3