Ticket #1113 (closed bug: duplicate)

Opened 6 years ago

Last modified 6 years ago

GHCi 6.6 and unicode at the REPL

Reported by: greg@… Owned by:
Priority: normal Milestone:
Component: GHCi Version: 6.6
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

While the following definition works fine in a source file (that's a Unicode  U+00B1 PLUS-MINUS SIGN)...

a ± b = (a+b, a-b) 

...I get an error when trying entering it at the REPL prompt...

Prelude> let a ± b = (a+b, a-b)
<interactive>:1:4: Parse error in pattern
Prelude>

...and using ":t" to display results with something other than ASCII type variables doesn't seem to work quite right. Here's an example program...

map' :: (α -> β) -> [α] -> [β]
map' _ [] = []
map' f (x:xs) = (f x) : map f xs

...and here's what the results looks like on my terminal...

 http://sleepingsquirrel.org/haskell/ghci_unicode.jpg

Change History

Changed 6 years ago by simonmar

  • status changed from new to closed
  • resolution set to duplicate

Thanks for the report - this bug is already in the database, see #782.

Note: See TracTickets for help on using tickets.