Ticket #4037 (closed bug: fixed)
ghc/ghc-6.12.1 interacts strangely with quoted command line parameters
| Reported by: | guest | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 7.0.1 |
| Component: | Compiler | Version: | 6.12.1 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description (last modified by igloo) (diff)
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
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

