#4037: ghc/ghc-6.12.1 interacts strangely with quoted command line parameters
---------------------------------+------------------------------------------
    Reporter:  guest             |       Owner:              
        Type:  bug               |      Status:  new         
    Priority:  normal            |   Component:  Compiler    
     Version:  6.12.1            |    Keywords:              
          Os:  Unknown/Multiple  |    Testcase:              
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown
---------------------------------+------------------------------------------
 pkgver.hs:
 {-# LANGUAGE CPP #-}
 main = print PACKAGE_VERSION

 PACKAGE_VERSION is expected to be a quoted string.

 c:\Sources>ghc --version
 The Glorious Glasgow Haskell Compilation System, version 6.12.1

 c:\Sources>ghc --make -DPACKAGE_VERSION=\"2.4.1\" pkgver.hs -fforce-recomp
 [1 of 1] Compiling Main             ( pkgver.hs, pkgver.o )
 Linking pkgver.exe ...

 c:\Sources>ghc-6.10.4.exe --make -DPACKAGE_VERSION=\"2.4.1\" pkgver.hs
 -fforce-recomp
 [1 of 1] Compiling Main             ( pkgver.hs, pkgver.o )

 pkgver.hs:2:7:
     Couldn't match expected type `b -> c' against inferred type `IO ()'
     In the first argument of `(.)', namely `print 2.4'
     In the expression: print 2.4 . 1
     In the definition of `main': main = print 2.4 . 1

 c:\Sources>ghc-6.12.1.exe --make -DPACKAGE_VERSION=\"2.4.1\" pkgver.hs
 -fforce-recomp
 [1 of 1] Compiling Main             ( pkgver.hs, pkgver.o )

 pkgver.hs:2:7:
     Couldn't match expected type `b -> c' against inferred type `IO ()'
     In the first argument of `(.)', namely `print 2.4'
     In the expression: print 2.4 . 1
     In the definition of `main': main = print 2.4 . 1


 Issue seen in the wild thanks to cabal -w flag. Building darcs with "cabal
 install darcs-2.4 -w ghc-6.10.4.exe" fails.

 Affected 6.10.4 and 6.12.1. More info here:
 http://bugs.darcs.net/issue1824

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4037>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to