M-x untabify & M-x delete-trailing-whitespace
authorHerbert Valerio Riedel <hvr@gnu.org>
Sat, 27 Dec 2014 22:21:44 +0000 (23:21 +0100)
committerHerbert Valerio Riedel <hvr@gnu.org>
Sat, 27 Dec 2014 22:23:41 +0000 (23:23 +0100)
C.hs
Common.hs
DirectCodegen.hs

diff --git a/C.hs b/C.hs
index 11d31f2..c6a7e5e 100644 (file)
--- a/C.hs
+++ b/C.hs
@@ -152,18 +152,18 @@ outTokenC (pos, key, arg) =
             's':'t':'r':'u':'c':'t':' ':_ -> ""
             't':'y':'p':'e':'d':'e':'f':' ':_ -> ""
             'i':'n':'l':'i':'n':'e':' ':arg' ->
-               case span (\c -> c /= '{' && c /= '=') arg' of
-               (header, body) ->
-                   outCLine pos++
-                   "#ifndef __GNUC__\n" ++
-                   "extern inline\n" ++
-                   "#endif\n"++
-                   header++
-                   "\n#ifndef __GNUC__\n" ++
-                   ";\n" ++
-                   "#else\n"++
-                   body++
-                   "\n#endif\n"
+                case span (\c -> c /= '{' && c /= '=') arg' of
+                (header, body) ->
+                    outCLine pos++
+                    "#ifndef __GNUC__\n" ++
+                    "extern inline\n" ++
+                    "#endif\n"++
+                    header++
+                    "\n#ifndef __GNUC__\n" ++
+                    ";\n" ++
+                    "#else\n"++
+                    body++
+                    "\n#endif\n"
             _ -> outCLine pos++arg++"\n"
         _ | conditional key -> outCLine pos++"#"++key++" "++arg++"\n"
         _ -> ""
@@ -207,4 +207,3 @@ showCString = concatMap showCChar
                       intToDigit (ord c `quot` 64),
                       intToDigit (ord c `quot` 8 `mod` 8),
                       intToDigit (ord c          `mod` 8)]
-
index 7b33093..ae11241 100644 (file)
--- a/Common.hs
+++ b/Common.hs
@@ -66,4 +66,3 @@ catchIO = Exception.catch
 
 onlyOne :: String -> IO a
 onlyOne what = die ("Only one "++what++" may be specified\n")
-
index 42b31a5..c6f428d 100644 (file)
@@ -31,7 +31,7 @@ outputDirect config outName outDir outBase name toks = do
 -- via GHC has changed a few times, so this seems to be the only way...  :-P * * *
                           ++ ".exe"
 #endif
-       outHFile     = outBase++"_hsc.h"
+        outHFile     = outBase++"_hsc.h"
         outHName     = outDir++outHFile
         outCName     = outDir++outBase++"_hsc.c"
 
@@ -107,4 +107,3 @@ outputDirect config outName outDir outBase name toks = do
             concatMap outTokenC specials
             -- NB. outHFile not outHName; works better when processed
             -- by gcc or mkdependC.
-