[Hugs] #94: pattern match failure on Chars with Unicode codepoint >0x4ff

Hugs trac at galois.com
Thu Sep 3 22:58:16 EDT 2009


#94: pattern match failure on Chars with Unicode codepoint >0x4ff
--------------------+-------------------------------------------------------
 Reporter:  guest   |       Owner:  nobody 
     Type:  defect  |      Status:  new    
 Priority:  major   |   Milestone:         
Component:  hugs    |     Version:  current
 Keywords:          |  
--------------------+-------------------------------------------------------
 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.[[BR]] 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.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/94>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell


More information about the Hugs-Bugs mailing list