Opened 9 years ago

Closed 9 years ago

Last modified 6 years ago

#739 closed bug (worksforme)

command-line expressions with double-quoted strings misinterpret some special symbols

Reported by: pedromiguel.duarte@… Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.4.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

try for instance

ghc -e " reverse \"2<3\" "
or
ghc -e " reverse \"23\" "

The first gives a parsing error,
while the second returns "32" instead of "32"

Change History (5)

comment:1 Changed 9 years ago by simonmar

  • Resolution set to worksforme
  • Status changed from new to closed

Discussion on the mailing list indicates that you were trying to do this from Java, and the problem is a result of the Java exec interface not understanding quoting (perhaps).

The examples you give work fine from a /bin/sh command line on Linux or Windows.

If you can provide a more specific example that fails, please re-open the bug.

comment:2 Changed 9 years ago by simonpj

  • Resolution worksforme deleted
  • Status changed from closed to reopened

I am running GHC on a windows XP platform. The bug i did report has nothing to do with java.

Yes I found the problem while running a java program, but then i did try to execute

   ghc -e "reverse \"2<3\"" 

directly on a command line, and i get a message like "the system can't find the specified file".

If try

   ghc -e "reverse \"2^3\"" 

then i get "32"

If you think its's worth i can rewrite these examples as a new bug.

pedro

comment:3 Changed 9 years ago by simonmar

  • Resolution set to worksforme
  • Status changed from reopened to closed

I think the submitter of the bug is expecting shell quoting to work in a different way than it actually does, and/or is using a shell with quoting semantics different from those expected.

comment:4 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:5 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.