id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
2997,Package names starting with a numeric character cause assembler errors,mboes,igloo,"Hi,

When trying to compile a package named 9pH, I get the following error:
{{{
/usr/bin/ghc -O -package-name 9pH-0.1 --make -XOverloadedStrings -XPatternGuards -XTemplateHaskell Network.GpH.Protocol.Derive      
[1 of 1] Compiling Network.GpH.Protocol.Derive ( Network/GpH/Protocol/Derive.hs, Network/GpH/Protocol/Derive.o )
/tmp/ghc4263_0/ghc4263_0.s: Assembler messages:

/tmp/ghc4263_0/ghc4263_0.s:18137:0:
     Error: junk at end of line, first unrecognized character is `9'

/tmp/ghc4263_0/ghc4263_0.s:18165:0:
     Error: junk at end of line, first unrecognized character is `9'

/tmp/ghc4263_0/ghc4263_0.s:18166:0:
     Error: unrecognized symbol type ""9""

/tmp/ghc4263_0/ghc4263_0.s:18166:0:
     Error: junk at end of line, first unrecognized character is `p'

/tmp/ghc4263_0/ghc4263_0.s:18167:0:
     Error: junk at end of line, first unrecognized character is `9'

/tmp/ghc4263_0/ghc4263_0.s:18168:0:
     Error: junk at end of line, first unrecognized character is `p'

/tmp/ghc4263_0/ghc4263_0.s:18172:0:
     Error: junk at end of line, first unrecognized character is `p'

/tmp/ghc4263_0/ghc4263_0.s:18245:0:
     Error: junk at end of line, first unrecognized character is `p'
...
}}}

It turns out that if I remove '-package-name 9pH-0.1' from the command line, or change the package name, then the compilation completes without error.

It seems that either:
 1. Package names starting with numeric characters should be banned. In which case it should be
    clearly documented in the user's guide and/or in the cabal manual and the compiler should
    check this early on in the compilation.
 2. Package names starting with a numeric character should be allowed. In which case package
    names should be mangled appropriately to avoid having the assembler complain.

In my view option 2 would be preferable.

Many thanks,

Mathieu",bug,closed,normal,6.10.2,Compiler,6.10.1,fixed,,,Unknown/Multiple,Unknown/Multiple,,Unknown,,,,
