[Haskell-cafe] Data.Ranges show error
Aaron Gray
aaronngray.lists at gmail.com
Sat Jan 22 03:47:55 CET 2011
On 22 January 2011 02:32, Aaron Gray <aaronngray.lists at gmail.com> wrote:
> I am getting the following error when trying to do a show on a Ranges
> object :-
>
> C:\Languages\Haskell>ghci rangeTest.hs
> GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help
> Loading package ghc-prim ... linking ... done.
> Loading package integer-gmp ... linking ... done.
> Loading package base ... linking ... done.
> Loading package ffi-1.0 ... linking ... done.
> [1 of 1] Compiling Main ( rangeTest.hs, interpreted )
> Ok, modules loaded: Main.
> *Main> main
> Loading package array-0.3.0.1 ... linking ... done.
> Loading package containers-0.3.0.0 ... linking ... done.
> Loading package ranges-0.2.3 ... linking ... done.
> Ranges [(37*** Exception: <stdout>: hPutChar: invalid argument (character
> is not
> in the code page)
> *Main>
>
> I have attached the test source also :-
>
> import Data.Ranges
>
> test = (ranges [
> range 32 33,
> range 34 35,
> range 37 39
> ])
>
>
> main :: IO ()
> main = do {
> putStrLn (show test)
> }
>
>
Data.Ranges.hs:12
show (Range x y) = concat ["(", show x, "–", show y, ")"]
Contains the following charcter sequence :-
–
Which does not seem to be supported in Windows codepage.
Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110122/407bf2b4/attachment.htm>
More information about the Haskell-Cafe
mailing list