Re: -keep-hc-files or -keep-hc-file?

2007-06-30 Thread Ian Lynagh
On Thu, Jun 28, 2007 at 03:46:31PM +0200, Christian Maeder wrote:
 Christian Maeder schrieb:
  I'm currently confused if it must be plural or singular (or any)
  
  http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#keeping-intermediates
  
  shows plural options whereas
   
  http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html#id3131928
  
  shows them in singular (except -keep-tmp-files)

Well spotted; thanks for reporting it!

 The plural options work! So flag-reference.html should be corrected.

In actual fact the flag reference was exactly right, except the flags
could take any argument, which they then ignore (so the ss were being
treated as an argument when you gave the flags as plurals).

This meant that things like -keep-s-file=no would also result in the
.s file being kept, so I've changed the code to accept only
-keep-foo (makes sense when using ghc -c) and -keep-foos (makes sense
when using ghc --make). -keep-tmp-files is still plural-only.

Everything should be consistent now.


Thanks
Ian

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #1471: -ddump-cmm doesn't escape non-ascii/non-printable characters

2007-06-30 Thread GHC
#1471: -ddump-cmm doesn't escape non-ascii/non-printable characters
---+
  Reporter:  SamB  |  Owner: 
  Type:  bug   | Status:  new
  Priority:  normal|  Milestone: 
 Component:  Compiler  |Version:  6.6.1  
  Severity:  normal|   Keywords: 
Difficulty:  Unknown   | Os:  Unknown
  Testcase:|   Architecture:  Unknown
---+
For instance, the string literal {{{\102\232\13\0Hello,
 world!\n\178\14\89\179\1\176\4\205\128\49\192\195}}} came out of ghc
 --make -ddump-cmm hell.hs | less looking like:

 {{{
 cUz_str:
 I8[] fè^MC080Hello, world!
 ²^NY³^A°^DÍU+00801ÀÃ
 }}}

 (with LANG=un_US.UTF-8 and a UTF-8 capable terminal; this value gets
 passed to unpackCStringUtf8#)

 I also have to wonder what the point of using UTF-8 when the original
 string literal only contains characters in the range ['0'..'\255'] is...

 The full program was:

 {{{
 #!text/x-haskell
 {-# LANGUAGE ForeignFunctionInterface #-}
 import Foreign.Ptr
 import Foreign.C.String

 foreign import ccall dynamic mkFun :: FunPtr (IO ()) - IO ()

 code :: String
 code = \102\232\13\0Hello,
 world!\n\178\14\89\179\1\176\4\205\128\49\192\195

 main :: IO ()
 main = withCString code (mkFun . castPtrToFunPtr)
 }}}

 Note: this doesn't seem to actually work :-(. Oh, right, I'm only setting
 the lowest 8 bits of each register. That explains that...

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1471
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #1444: Template Haskell: add proper support for qualified names in non-splicing applications

2007-06-30 Thread GHC
#1444: Template Haskell: add proper support for qualified names in non-splicing
applications
-+--
Reporter:  SamB  |Owner: 
Type:  feature request   |   Status:  new
Priority:  normal|Milestone: 
   Component:  Template Haskell  |  Version:  6.6.1  
Severity:  normal|   Resolution: 
Keywords:|   Difficulty:  Unknown
  Os:  Unknown   | Testcase: 
Architecture:  Unknown   |  
-+--
Comment (by SamB):

 One example that exhibits the problem is:

 {{{
 % (echo import qualified System.IO; ghc -fth -e 'let s = unlines [show
 n++ bottles of beer on the wall, ++show n++ bottles of beer, take one
 down, pass it around, ++show (n-1)++ bottles of beer. | n -
 [100,99..1]] in Language.Haskell.TH.runQ [d| main = putStr s  return ()
 |] = (print . Language.Haskell.TH.ppr)')  beer.hs
 % runhugs beer.hs
 runhugs: Error occurred
 ERROR beer.hs:10275 - Syntax error in input (unexpected `)')
 }}}

 Yeah, I know that's a pretty long one-liner...

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1444
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #1472: undefined reference to `ZCMain_main_CAF_cc'

2007-06-30 Thread GHC
#1472: undefined reference to `ZCMain_main_CAF_cc'
+---
  Reporter:  greenrd|  Owner:
  Type:  bug| Status:  new   
  Priority:  normal |  Milestone:
 Component:  Profiling  |Version:  6.7   
  Severity:  normal |   Keywords:
Difficulty:  Unknown| Os:  Linux 
  Testcase: |   Architecture:  x86_64 (amd64)
+---
When building my project with profiling, and using a makefile, it works
 OK, until I try to use the -caf-all option:

 {{{
 find build -name '*.o_p'|xargs ghc-darcs -o hcoq -package mtl -package
 filepath -package template-haskell -package frisby -package wl-pprint
 -odirbuild -hidirbuild -fforce-recomp -prof
 build/Main.o_p: In function `ZCMain_main_CAF_cc_ccs':
 : undefined reference to `ZCMain_main_CAF_cc'
 collect2: ld returned 1 exit status
 make: *** [hcoq] Error 123
 }}}

 This happens whether or not I supply -caf-all to the final ghc-darcs
 invocation.

 This is with ghc 6.7.20070618.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1472
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs