aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock')
-rw-r--r--src/Haddock/Exception.hs16
1 files changed, 8 insertions, 8 deletions
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