wxdirect 0.92.1.0 → 0.92.2.0
raw patch · 4 files changed
+24/−9 lines, 4 filesdep ~process
Dependency ranges changed: process
Files
- src/CompileClassTypes.hs +6/−1
- src/CompileClasses.hs +12/−6
- src/ParseC.hs +3/−0
- wxdirect.cabal +3/−2
src/CompileClassTypes.hs view
@@ -69,6 +69,11 @@ heading i name = exportSpaces ++ "-- " ++ replicate i '*' ++ " " ++ name - exportComma n m str = exportSpaces ++ (if n == 0 && m == 0 then " " else ",") ++ str + exportComma n m str = exportSpaces + ++ (if n == 0 && m == 0 then " " else ",") + ++ str +-- To prevent messages like "Defined but not used: data constructor `CConfigBase'": + ++ (if m == 2 then "(..)" else "") + exportSpaces = " "
src/CompileClasses.hs view
@@ -17,7 +17,7 @@ import Data.Time( getCurrentTime ) import Data.Char( toLower ) -import Data.List( isPrefixOf, sort, sortBy, elemIndex ) +import Data.List( isInfixOf, isPrefixOf, sort, sortBy, elemIndex ) import Types import HaskellNames @@ -106,11 +106,17 @@ , [ " ) where" , "" , "import Prelude hiding (id, last, length, lines, max, min, show)" - , "import qualified Data.ByteString as B (ByteString, useAsCStringLen)" - , "import qualified Data.ByteString.Lazy as LB (ByteString, length, unpack)" - , "import System.IO.Unsafe( unsafePerformIO )" - -- , "import Foreign.C.Types(CInt(..), CWchar(..), CChar(..), CDouble(..))" - , "import " ++ moduleRoot ++ "WxcTypes hiding (rect, rgb, rgba, sz)" + ] + , if any ("B.ByteString" `isInfixOf`) typeDecls + then + [ "import qualified Data.ByteString as B (ByteString, useAsCStringLen)" + , "import qualified Data.ByteString.Lazy as LB (ByteString, length, unpack)" + ] + else [] + , if any ("unsafePerformIO" `isInfixOf`) haskellDecls + then ["import System.IO.Unsafe( unsafePerformIO )"] + else [] + , [ "import " ++ moduleRoot ++ "WxcTypes hiding (rect, rgb, rgba, sz)" , "import " ++ moduleRoot ++ moduleClassTypesName , "" ]
src/ParseC.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------------------- {-| Module : ParseC Copyright : (c) Daan Leijen 2003 @@ -15,7 +16,9 @@ import Data.Char( isSpace ) import Data.List( isPrefixOf ) import Data.Maybe( isJust ) +#if __GLASGOW_HASKELL__ < 710 import Data.Functor( (<$>) ) +#endif import System.Process( readProcess ) import System.Environment (lookupEnv) import Text.ParserCombinators.Parsec
wxdirect.cabal view
@@ -1,5 +1,5 @@ name: wxdirect -version: 0.92.1.0 +version: 0.92.2.0 license: BSD3 license-file: LICENSE author: Daan Leijen @@ -11,7 +11,8 @@ top of wxWidgets, a comprehensive C++ library that is portable across all major GUI platforms, including GTK, Windows, X11, and MacOS X. This version works with wxWidgets 2.9 and 3.0. -homepage: https://wiki.haskell.org/WxHaskell +homepage: https://wiki.haskell.org/WxHaskell +bug-reports: http://sourceforge.net/p/wxhaskell/bugs/ cabal-version: >= 1.2 build-type: Simple