aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Exception.hs
blob: 0ce002b0637e9d862aa6d276ef1e1217492203f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--
-- Haddock - A Haskell Documentation Tool
--
-- (c) Simon Marlow 2003
--


{-# LANGUAGE DeriveDataTypeable #-}


module Haddock.Exception (
  HaddockException,
  throwE
) where


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