HSFFIG 1.1 → 1.1.2
raw patch · 4 files changed
+13/−7 lines, 4 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- HSFFIG.cabal +2/−2
- programs/Makefile.hs +2/−2
- programs/WriteHsc.hs +2/−2
- programs/ffipkg.hs +7/−1
HSFFIG.cabal view
@@ -1,5 +1,5 @@ Name: HSFFIG-Version: 1.1+Version: 1.1.2 License: BSD3 License-file: License.txt Copyright: 2005 - 2009, Dimitry Golubovsky@@ -35,7 +35,7 @@ . Please note that @hsffig@ and @ffipkg@ will likely not work properly with C++ include files.-Build-depends: base >=4 , parsec < 3 , Cabal>=1.5, filepath, unix, +Build-depends: base >=4 && < 5, parsec < 3 , Cabal>=1.5, filepath, unix, process, containers, array, directory Exposed-modules: HSFFIG.FieldAccess Extensions: MultiParamTypeClasses
programs/Makefile.hs view
@@ -37,12 +37,12 @@ map chr [], map chr [36,40,76,79,67,41,47,108,105,98,72,83,36,40,80,75,71,41,45,36,40,86,69,82,41,46,97,32,58,32,36,40,66,65,83,69,41,46,104,115,99], map chr [9,36,40,69,67,72,79,41,32,34,105,110,99,108,117,100,101,32,77,97,107,101,102,105,108,101,34,32,62,32,36,40,66,65,83,69,41,95,100,101,112,101,110,100],- map chr [9,36,40,71,72,67,41,32,45,112,97,99,107,97,103,101,32,72,83,70,70,73,71,32,45,77,32,36,40,66,65,83,69,41,42,46,104,115,32,45,111,112,116,100,101,112,45,102,32,45,111,112,116,100,101,112,36,40,66,65,83,69,41,95,100,101,112,101,110,100],+ map chr [9,36,40,71,72,67,41,32,45,112,97,99,107,97,103,101,32,72,83,70,70,73,71,32,45,77,32,36,40,66,65,83,69,41,42,46,104,115,32,45,100,101,112,45,109,97,107,101,102,105,108,101,32,36,40,66,65,83,69,41,95,100,101,112,101,110,100], map chr [9,36,40,71,72,67,41,32,45,99,32,36,40,66,65,83,69,41,95,104,115,99,46,99], map chr [9,36,40,77,65,75,69,41,32,45,102,32,36,40,66,65,83,69,41,95,100,101,112,101,110,100,32,36,40,66,65,83,69,41,95,83,95,116,46,111,32,36,40,66,65,83,69,41,95,83,95,110,46,111,32,36,40,66,65,83,69,41,95,83,95,100,46,111,32,92], map chr [9,9,36,40,66,65,83,69,41,95,67,46,111,32,36,40,66,65,83,69,41,95,83,46,111,32,36,40,66,65,83,69,41,46,111], map chr [9,36,40,82,77,41,32,45,102,32,36,64],- map chr [9,36,40,65,82,41,32,99,113,32,36,64,32,36,40,66,65,83,69,41,95,104,115,99,46,111],+ map chr [9,36,40,65,82,41,32,99,113,32,36,64,32,36,40,66,65,83,69,41,95,104,115,99,46,111,32,36,40,69,88,84,82,65,95,79,66,74,41], map chr [9,36,40,70,73,78,68,41,32,46,32,45,110,97,109,101,32,39,36,40,66,65,83,69,41,42,46,111,39,32,124,32,36,40,71,82,69,80,41,32,39,115,112,108,105,116,47,39,32,124,32,36,40,109,97,107,101,45,108,105,98,114,97,114,121,41], map chr [], map chr [],
programs/WriteHsc.hs view
@@ -680,7 +680,7 @@ -- of the type because underscores serve as separators between parts of the type -- definition. -con2num con = "#const(" ++ map un2bq (show con) ++ ")@" where+con2num con = "(#const(" ++ map un2bq (show con) ++ "))@" where un2bq '_' = '`' un2bq z = z @@ -876,7 +876,7 @@ -- Check whether the typestring represents an array type. isarrt at = let firstdim = takeWhile (/= '@') at in- (length firstdim > 0) && ("#const" `isPrefixOf` firstdim)+ (length firstdim > 0) && ("(#const" `isPrefixOf` firstdim) -- Special version of the type map function considering conversion of arrays -- into pointers.
programs/ffipkg.hs view
@@ -37,6 +37,7 @@ | IncPath String | LibPath String | LibFile String+ | ObjFile String | CppOpt String | HelpMsg | NewHooks@@ -61,6 +62,7 @@ Option ['I'] [] (ReqArg IncPath "") "include files location (may be multiple)", Option ['L'] [] (ReqArg LibPath "") "library files location (may be multiple)", Option ['l'] [] (ReqArg LibFile "") "library file to link (may be multiple)",+ Option ['a'] [] (ReqArg ObjFile "") "object file to add (may be multiple)", Option ['c'] ["cpp"] (ReqArg CppOpt "") "option for CPP (may be multiple)", Option ['V'] ["version"] (NoArg ShowVn) "show program version number", Option ['w'] ["package-version"] (ReqArg PkgVn dfVn) "specify version of the package",@@ -109,6 +111,7 @@ libDirs :: [String], inclFiles :: [String], libFiles :: [String],+ objFiles :: [String], cppOpts :: [String], pkgName :: String, pkgVersion :: String,@@ -173,6 +176,7 @@ `ap` return [] `ap` return [] `ap` return []+ `ap` return [] `ap` return "" `ap` return dfVn `ap` return True -- always use new hooks@@ -199,6 +203,7 @@ updOptInfo oi (Hsc2hs s) = oi {hsc2hsPath = Just s} updOptInfo oi (IncPath s) = oi {inclDirs = s : (inclDirs oi)} updOptInfo oi (LibPath s) = oi {libDirs = s : (libDirs oi)}+updOptInfo oi (ObjFile s) = oi {objFiles = s : (objFiles oi)} updOptInfo oi (LibFile s) = oi {libFiles = s : (libFiles oi)} updOptInfo oi (CppOpt s) = oi {cppOpts = s : (cppOpts oi)} updOptInfo oi (PkgName s) = oi {pkgName = (map toUpper s)} @@ -470,6 +475,7 @@ hPutStrLn mkffd $ "GCC = " ++ (fromJust $ gccPath dopt) ++ " " ++ intlv minusI " " ++ intlv minusD " " hPutStrLn mkffd $ "GHC = " ++ (fromJust $ ghcPath dopt) ++ " " ++ intlv minusI " "+ hPutStrLn mkffd $ "EXTRA_OBJ = " ++ intlv (map (" " ++) (reverse (objFiles dopt))) " " mapM (\(s, m) -> hPutStrLn mkffd $ (map toUpper s) ++ " = " ++ fromJust m) progs hPutStrLn mkffd $ "" writeMakefile mkffd@@ -490,7 +496,7 @@ when (length (libDirs dopt) > 0) $ hPutStrLn cabfd $ "Extra-lib-dirs:\n" ++ intlv (map (" " ++) (reverse (libDirs dopt))) ",\n" when (length (libFiles dopt) > 0) $- hPutStrLn cabfd $ "Extra-libraries:\n" ++ intlv (map (" " ++) (reverse ( libFiles dopt))) ",\n"+ hPutStrLn cabfd $ "Extra-libraries:\n" ++ intlv (map (" " ++) (reverse (libFiles dopt))) ",\n" hClose cabfd -- Create the Setup.hs file. It is mostly taken from the template. Choice