Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#1277 closed merge (fixed)

illegal chars accepted in literal strings

Reported by: malcolm.wallace@… Owned by:
Priority: normal Milestone: 6.8.1
Component: Compiler Version: 6.6
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Easy (less than 1 hour)
Test Case: read033 Blocked By:
Blocking: Related Tickets:

Description

Ghc accepts literal tab characters inside literal strings, even though these are not permitted by Haskell'98.
Example:

Prelude> "I"
"\t"
Prelude>

Other compilers correctly reject them:

nhc98> "I"
Error at line 1, column 2: Tab in literal string/char. Use \t instead.

Change History (7)

comment:1 Changed 7 years ago by simonmar

  • Milestone set to 6.6.2
  • Type changed from bug to merge

Fixed, need a test case and a merge:

Mon Apr 16 04:04:33 PDT 2007  Simon Marlow <simonmar@microsoft.com>
  * tab, verttab, formfeed, and CR are not allowed in strings

comment:2 Changed 7 years ago by simonmar

  • Test Case set to read033

test added.

comment:3 Changed 7 years ago by simonmar

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

comment:4 Changed 7 years ago by simonmar

  • Milestone changed from 6.6.2 to 6.8.1

comment:5 Changed 6 years ago by simonmar

  • Architecture changed from Multiple to Unknown/Multiple

comment:6 Changed 6 years ago by simonmar

  • Operating System changed from Multiple to Unknown/Multiple

comment:7 Changed 5 years ago by simonmar

  • Difficulty changed from Easy (1 hr) to Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.