summaryrefslogtreecommitdiff
blob: dfc484a1eb9a69237cf5d5a6cd165e69dd8929b7 (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--- wxdirect-0.13.1.3-orig/src/ParseEiffel.hs	2012-09-30 20:02:15.000000000 +1000
+++ wxdirect-0.13.1.3/src/ParseEiffel.hs	2014-03-23 14:15:23.118131281 +1100
@@ -1,3 +1,4 @@
+{-# LANGUAGE ScopedTypeVariables #-}
 -----------------------------------------------------------------------------------------
 {-| Module      :  ParseEiffel
     Copyright   :  (c) Daan Leijen 2003
@@ -12,6 +13,8 @@
 -----------------------------------------------------------------------------------------
 module ParseEiffel( parseEiffel ) where
 
+import Prelude hiding ( catch )
+import Control.Exception ( catch, IOException )
 import Data.Char( digitToInt )
 import Text.ParserCombinators.Parsec
 import qualified Text.ParserCombinators.Parsec.Token as P
--- wxdirect-0.13.1.3-orig/src/Classes.hs	2012-09-30 20:02:15.000000000 +1000
+++ wxdirect-0.13.1.3/src/Classes.hs	2014-03-23 14:15:23.118131281 +1100
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 -----------------------------------------------------------------------------------------
 {-| Module      :  Classes
     Copyright   :  (c) Daan Leijen 2003
@@ -28,7 +29,9 @@
 import Data.List( sort, sortBy )
 import qualified Data.Set as Set
 import qualified Data.Map as Map
+#if !MIN_VERSION_base(4,6,0)
 import Prelude hiding ( catch )
+#endif
 import HaskellNames( haskellTypeName, isBuiltin )
 import Types
 
--- wxdirect-0.13.1.3-orig/src/CompileClasses.hs	2012-09-30 20:02:15.000000000 +1000
+++ wxdirect-0.13.1.3/src/CompileClasses.hs	2014-03-23 14:15:23.119131301 +1100
@@ -89,7 +89,7 @@
            (exportsStatic,exportsClassClasses,classCount) = exportDefs decls exportsClass []
 
            methodCount  = length decls
-           ghcoptions   = [ "{-# LANGUAGE ForeignFunctionInterface #-}"]
+           ghcoptions   = [ "{-# LANGUAGE CPP, ForeignFunctionInterface #-}"]
 
            export   = concat  [ ["module " ++ moduleRoot ++ moduleName
                                 , "    ( -- * Global" ]
@@ -104,6 +104,9 @@
                                 , "import System.IO.Unsafe( unsafePerformIO )"
                                 , "import " ++ moduleRoot ++ "WxcTypes"
                                 , "import " ++ moduleRoot ++ moduleClassTypesName
+                                , "#if (__GLASGOW_HASKELL__>=705)"
+                                , "import Foreign.C.Types(CDouble(..), CInt(..), CWchar(..))"
+                                , "#endif"
                                 , ""
                                 ]
                               ]