GHCi 6.6 and unicode at the REPL
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
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |