Ticket #94 (new defect)

Opened 4 years ago

Last modified 4 years ago

pattern match failure on Chars with Unicode codepoint >0x4ff

Reported by: guest Owned by: nobody
Priority: major Milestone:
Component: hugs Version: current
Keywords: Cc:

Description

hi,

i tested the following code in Hugs:

patternMatchingWorks1 = case '\x4ff' of '\x4ff' -> True
patternMatchingWorks2 = case '\x500' of '\x500' -> True
patternMatchingWorks3 = f '\x4ff' where f '\x4ff' = True
patternMatchingWorks4 = f '\x500' where f '\x500' = True
patternMatchingWorks5 = (\'\x4ff'->True) '\x4ff'
patternMatchingWorks6 = (\'\x500'->True) '\x500'

and got the following output:

Main> :load "M:\\haskell\\sources\\WinHugsPatternMatchingBug.hs"
Main> patternMatchingWorks1
True
Main> patternMatchingWorks2

Program error: pattern match failure: patternMatchingWorks2_v1621 '\1280'

Main> patternMatchingWorks3
True
Main> patternMatchingWorks4

Program error: pattern match failure: patternMatchingWorks4_v1623 '\1280'

Main> patternMatchingWorks5
True
Main> patternMatchingWorks6

Program error: pattern match failure: patternMatchingWorks6_v1627 '\1280'

i tested it with hugs.exe and winhugs.exe (September 2006 version, i.e. the most recent according to the download page) on Windows XP Professional, both give the same result, while ghc gives the correct result.
Pattern matching seems to fail for all Chars with codepoint >0x4ff. i understand that Hugs doesn't fully support Unicode, but is this intended behaviour? If so, please mention it on the "Hugs Bugs & Features" page.

Change History

in reply to: ↑ description   Changed 4 years ago by guest

oh, i forgot to mention my e-mail address: pge03ipg@…
if there are any questions, write me a note. sorry for spamming.

Note: See TracTickets for help on using tickets.