|
Re: ghc-pkg 6.2 incorrectly parses commas within quotes: msg#00041lang.haskell.glasgow.bugs
Last month I wrote: > The 6.2 version of ghc-pkg is incorrectly parses commas within quotes. > Here's a simple example: > > $ echo 'Package {name="ptest",extra_ld_opts=["a,b,c"]}' | sudo ghc-pkg -a > $ ghc-pkg -s ptest > Package > {name = "ptest", > auto = False, > import_dirs = [], > source_dirs = [], > library_dirs = [], > hs_libraries = [], > extra_libraries = [], > include_dirs = [], > c_includes = [], > package_deps = [], > extra_ghc_opts = [], > extra_cc_opts = [], > extra_ld_opts = ["a", "b", "c"], > framework_dirs = [], > extra_frameworks = []} > > This breaks JVM-Bridge, because I have a line that looks like this: > > extra_ld_opts = > [ > "-Wl,-rpath,/usr/lib/jvm-bridge/lib/", > "-Wl,-rpath,/usr/lib/j2sdk1.4.1_02/jre/lib/i386/", > "-Wl,-rpath,/usr/lib/j2sdk1.4.1_02/jre/lib/i386/client/" > ] > > It worked fine in 6.0. I also can't think of a robust workaround, i.e. > one that would work with a correct ghc-pkg. And also: > In article <40016305.4040402@xxxxxxxxx>, > Sven Panne <Sven.Panne@xxxxxxxxx> wrote: > > > which is plainly wrong. Now we do this *only* when a variable occurs on its > > own, > > like: > > > > ["${deps}","foo"] => ["base","haskell98","network","foo"] > > > > I have slight doubts about this obscure feature, but Sigbjorn seems to want > > it... > > Might it not be better to do it this way? > > deps = base,haskell98,network > > [${deps},"foo"] => (expand $-reference) > [base,haskell98,network,"foo"] => (quote things) > ["base","haskell98","network","foo"] > > The idea is that unquoted things get implicitly quoted, so you don't > need to quote ${deps}. Any word on whether this has been/will be fixed? It's breaking JVM-Bridge and there's no obvious clean workaround. Personally I'd favour tossing this "feature" altogether, but I'd be happy if it could at least be made less harmful. -- Ashley Yakeley, Seattle WA
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: GHC 5.05 panic in speceval_2 branch, Robert Ennals |
|---|---|
| Next by Date: | Re: ghc-pkg 6.2 incorrectly parses commas within quotes, Sven Panne |
| Previous by Thread: | RE: Documentation bug? {Numeric,GHC.Float}.floatToDigits: requires anon-negative argument, Simon Peyton-Jones |
| Next by Thread: | Re: ghc-pkg 6.2 incorrectly parses commas within quotes, Sven Panne |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |