Package: alex
Severity: normal
Tags: patch

When building 'alex' on amd64 with gcc-4.0,
I get the following error:

Main.hs:168: warning: backslash and newline separated by space
Main.hs:171: warning: backslash and newline separated by space
Main.hs:172: warning: backslash and newline separated by space
Main.hs:173: warning: backslash and newline separated by space
Main.hs:174: warning: backslash and newline separated by space
Main.hs:177: warning: backslash and newline separated by space
Main.hs:178: warning: backslash and newline separated by space
Main.hs:179: warning: backslash and newline separated by space
Main.hs:180: warning: backslash and newline separated by space
Main.hs:181: warning: backslash and newline separated by space
Main.hs:182: warning: backslash and newline separated by space
Main.hs:183: warning: backslash and newline separated by space
Main.hs:36: lexical error in string/character literal
make[4]: *** [Main.o] Error 1

With the attached patch 'alex' can be compiled
on amd64 using gcc-4.0.

This patch was taken from gentoo.

Regards
Andreas Jochens

diff -urN ../tmp-orig/alex-2.0/alex/src/Main.hs ./alex/src/Main.hs
--- ../tmp-orig/alex-2.0/alex/src/Main.hs       2005-03-21 09:17:50.043422346 
+0100
+++ ./alex/src/Main.hs  2005-03-21 09:17:38.939575291 +0100
@@ -32,9 +32,9 @@
 
 import Prelude hiding ( catch )
 
--- hackery to convice cpp to splice ALEX_VERSION into a string
-version = tail "\ 
-   \ ALEX_VERSION"
+-- hackery to convice cpp to splice  into a string
+version = tail $ "" ++
+   " "
 
 -- `main' decodes the command line arguments and calls `alex'.  
 
@@ -159,29 +159,29 @@
 
 -- CPP is turned on for -fglasogw-exts, so we can use conditional compilation:
 
-always_imports = "#if __GLASGOW_HASKELL__ >= 503\n\ 
-                  \import Data.Array\n\ 
-                  \import Data.Char (ord)\n\ 
-                  \import Data.Array.Base (unsafeAt)\n\ 
-                  \#else\n\ 
-                  \import Array\n\ 
-                  \import Char (ord)\n\ 
-                  \#endif\n"
-
-import_glaexts = "#if __GLASGOW_HASKELL__ >= 503\n\ 
-                  \import GHC.Exts\n\ 
-                  \#else\n\ 
-                  \import GlaExts\n\ 
-                  \#endif\n"
-
-import_debug = "#if __GLASGOW_HASKELL__ >= 503\n\ 
-                  \import System.IO\n\ 
-                  \import System.IO.Unsafe\n\ 
-                  \import Debug.Trace\n\ 
-                  \#else\n\ 
-                  \import IO\n\ 
-                  \import IOExts\n\ 
-                  \#endif\n"
+always_imports = "#if __GLASGOW_HASKELL__ >= 503\n" ++
+                  "import Data.Array\n" ++
+                  "import Data.Char (ord)\n" ++
+                  "import Data.Array.Base (unsafeAt)\n" ++
+                  "#else\n" ++
+                  "import Array\n" ++
+                  "import Char (ord)\n" ++
+                  "#endif\n"
+
+import_glaexts = "#if __GLASGOW_HASKELL__ >= 503\n" ++
+                  "import GHC.Exts\n" ++
+                  "#else\n" ++
+                  "import GlaExts\n" ++
+                  "#endif\n"
+
+import_debug = "#if __GLASGOW_HASKELL__ >= 503\n" ++
+                  "import System.IO\n" ++
+                  "import System.IO.Unsafe\n" ++
+                  "import Debug.Trace\n" ++
+                  "#else\n" ++
+                  "import IO\n" ++
+                  "import IOExts\n" ++
+                  "#endif\n"
 
 templateDir cli
   = case [ d | OptTemplateDir d <- cli ] of


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to