summaryrefslogtreecommitdiff
blob: 0dc58a66f709f392fc590040137e401a7417adfc (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
--- wxdirect-0.13.1.2-orig/wxdirect.cabal	2012-02-07 18:26:28.000000000 +1100
+++ wxdirect-0.13.1.2/wxdirect.cabal	2012-11-29 17:03:30.132111644 +1100
@@ -68,7 +68,7 @@
   if flag(splitBase)
     build-depends:
         base       >= 4     && < 5,
-        containers >= 0.2   && < 0.5
+        containers >= 0.2   && < 0.6
   else
     build-depends:
         base       >= 3     && < 4,
--- wxdirect-0.13.1.2-orig/src/ParseEiffel.hs	2012-02-07 18:26:28.000000000 +1100
+++ wxdirect-0.13.1.2/src/ParseEiffel.hs	2013-01-11 20:11:46.192991896 +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
@@ -33,7 +36,7 @@
 
 getDefaultEiffelFiles :: IO [FilePath]
 getDefaultEiffelFiles
-  = do wxwin <- getEnv "WXWIN" `catch` \err -> return ""
+  = do wxwin <- getEnv "WXWIN" `catch` \(err::IOException) -> return ""
        return [wxwin ++ "/wxc/include/wxc_defs.e"
               ,wxwin ++ "/wxc/ewxw/eiffel/spec/r_2_4/wx_defs.e"]
 
--- wxdirect-0.13.1.2-orig/src/Classes.hs	2012-02-07 18:26:28.000000000 +1100
+++ wxdirect-0.13.1.2/src/Classes.hs	2012-11-29 17:12:55.416713615 +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.2-orig/src/CompileClasses.hs	2012-02-07 18:26:28.000000000 +1100
+++ wxdirect-0.13.1.2/src/CompileClasses.hs	2012-11-29 17:12:55.417713640 +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" ]
@@ -103,6 +103,9 @@
                                 , "import System.IO.Unsafe( unsafePerformIO )"
                                 , "import " ++ moduleRoot ++ "WxcTypes"
                                 , "import " ++ moduleRoot ++ moduleClassTypesName
+                                , "#if (__GLASGOW_HASKELL__>=705)"
+                                , "import Foreign.C.Types(CDouble(..), CInt(..), CWchar(..))"
+                                , "#endif"
                                 , ""
                                 ]
                               ]