FW: Installing syb(-0.1.03) package in head version of Haskell

Friends
Can anyone help Kathleen out? She has a cabal-install issue. I think she's on a Mac.
Many thanks
Simon
From: Kathleen Fisher [mailto:kathleen.fisher@gmail.com]
Sent: 16 February 2010 22:54
To: Simon Peyton-Jones
Subject: Fwd: Installing syb(-0.1.03) package in head version of Haskell
Hi Simon,
I'm trying to get the PADS file we were working on compiling under the HEAD version of Haskell, but I'm having trouble getting the Data.Generics module to install. I sent the question below to the libraries@haskell.orgmailto:libraries@haskell.org last week, but I haven't seen any replies. Is that the right address? Or is there a different place to ask such questions?
Thanks for any pointers!
Kathleen
Begin forwarded message:
From: Kathleen Fisher

Just a wild guess, but the package description has this non-ascii text: author: Ralf Lämmel, Simon Peyton Jones It could well be Latin-1 encoded, rather than UTF8. Try editing the author field to this: author: Ralf Laemmel, Simon Peyton Jones and rebuilding/installing.
-----Original Message----- From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users-bounces@haskell.org] On Behalf Of Simon Peyton-Jones Sent: 23 February 2010 14:32 To: GHC users Cc: cvs-ghc@haskell.org Subject: FW: Installing syb(-0.1.03) package in head version of Haskell
Friends
Can anyone help Kathleen out? She has a cabal-install issue. I think she's on a Mac.
Many thanks
Simon
From: Kathleen Fisher [mailto:kathleen.fisher@gmail.com] Sent: 16 February 2010 22:54 To: Simon Peyton-Jones Subject: Fwd: Installing syb(-0.1.03) package in head version of Haskell
Hi Simon,
I'm trying to get the PADS file we were working on compiling under the HEAD version of Haskell, but I'm having trouble getting the Data.Generics module to install. I sent the question below to the libraries@haskell.org last week, but I haven't seen any replies. Is that the right address? Or is there a different place to ask such questions?
Thanks for any pointers!
Kathleen
Begin forwarded message:
From: Kathleen Fisher
Date: February 11, 2010 2:28:20 PM PST
To: libraries@haskell.org
Subject: Installing syb(-0.1.03) package in head version of Haskell
Hi all,
I'm trying to get a program that uses the Data.Generics module to compile under the head version of GHC, but I am having trouble getting the syb package installed.
I believe I am using the most recent version of cabal:
kfisher-laptop:/Users/kfisher/pads/dirpads/language-c-quote>~/ .cabal/bin/cabal --version
cabal-install version 0.8.0
using version 1.8.0.1 of the Cabal library
When I ask cabal to install the syb package, I get the following error:
kfisher-laptop:/Users/kfisher/pads/dirpads/language-c-quote>~/ .cabal/bin/cabal install -w ~/sw/ghc-head/bin/ghc
Resolving dependencies...
Downloading mtl-1.1.0.2...
Configuring mtl-1.1.0.2...
Preprocessing library mtl-1.1.0.2...
...
Registering syb-0.1.0.3...
cabal: ghc-pkg: <stdin>: hGetContents: invalid argument (invalid UTF-8 byte
sequence)
cabal: Error: some packages failed to install:
language-c-quote-0.1 depends on syb-0.1.0.3 which failed to install.
syb-0.1.0.3 failed during the building phase. The exception was:
exit: ExitFailure 1
The full trace is included below.
Here's the version information for the ghc I am running.
Kfisher-laptop:/Users/kfisher/pads/dirpads/language-c-quote>~/ sw/ghc-head/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.13.20100210
The cabal website suggests sending questions to this list...
Any suggestions for how to fix this problem?
Kathleen
kfisher-laptop:/Users/kfisher/pads/dirpads/language-c-quote>~/ .cabal/bin/cabal install -w ~/sw/ghc-head/bin/ghc
Resolving dependencies...
Downloading mtl-1.1.0.2...
Configuring mtl-1.1.0.2...
Preprocessing library mtl-1.1.0.2...
Building mtl-1.1.0.2...
...stuff deleted...
src/Data/Generics.hs:40:1:
Warning: The import of `Prelude' is redundant
except perhaps to import instances from `Prelude'
To import instances alone, use: import Prelude()
Registering syb-0.1.0.3...
cabal: ghc-pkg: <stdin>: hGetContents: invalid argument (invalid UTF-8 byte
sequence)
cabal: Error: some packages failed to install:
language-c-quote-0.1 depends on syb-0.1.0.3 which failed to install.
syb-0.1.0.3 failed during the building phase. The exception was:
exit: ExitFailure 1
***************************************************************** Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. *****************************************************************

I'm guessing that is indeed the problem, though I cannot reproduce the error
(but I'm using Cabal-1.8.0.2).
Assuming this is the cause of the problem, what is the best correction?
Encoding the cabal file as UTF-8 or removing the accent? Do earlier versions
of cabal deal well with UTF-8?...
Cheers,
Pedro
On Tue, Feb 23, 2010 at 16:05, Bayley, Alistair wrote: Just a wild guess, but the package description has this non-ascii text: author: Ralf Lämmel, Simon Peyton Jones It could well be Latin-1 encoded, rather than UTF8. Try editing the author field to this: author: Ralf Laemmel, Simon Peyton Jones and rebuilding/installing. -----Original Message-----
From: glasgow-haskell-users-bounces@haskell.org
[mailto:glasgow-haskell-users-bounces@haskell.org] On Behalf
Of Simon Peyton-Jones
Sent: 23 February 2010 14:32
To: GHC users
Cc: cvs-ghc@haskell.org
Subject: FW: Installing syb(-0.1.03) package in head version
of Haskell Friends Can anyone help Kathleen out? She has a cabal-install issue.
I think she's on a Mac. Many thanks Simon From: Kathleen Fisher [mailto:kathleen.fisher@gmail.com]
Sent: 16 February 2010 22:54
To: Simon Peyton-Jones
Subject: Fwd: Installing syb(-0.1.03) package in head version
of Haskell Hi Simon, I'm trying to get the PADS file we were working on compiling
under the HEAD version of Haskell, but I'm having trouble
getting the Data.Generics module to install. I sent the
question below to the libraries@haskell.org last week, but I
haven't seen any replies. Is that the right address? Or is
there a different place to ask such questions? Thanks for any pointers! Kathleen Begin forwarded message: From: Kathleen Fisher Date: February 11, 2010 2:28:20 PM PST To: libraries@haskell.org Subject: Installing syb(-0.1.03) package in head version of Haskell Hi all, I'm trying to get a program that uses the Data.Generics
module to compile under the head version of GHC, but I am
having trouble getting the syb package installed. I believe I am using the most recent version of cabal: kfisher-laptop:/Users/kfisher/pads/dirpads/language-c-quote>~/
.cabal/bin/cabal --version cabal-install version 0.8.0 using version 1.8.0.1 of the Cabal library When I ask cabal to install the syb package, I get the
following error: kfisher-laptop:/Users/kfisher/pads/dirpads/language-c-quote>~/
.cabal/bin/cabal install -w ~/sw/ghc-head/bin/ghc Resolving dependencies... Downloading mtl-1.1.0.2... Configuring mtl-1.1.0.2... Preprocessing library mtl-1.1.0.2... ... Registering syb-0.1.0.3... cabal: ghc-pkg: <stdin>: hGetContents: invalid argument
(invalid UTF-8 byte sequence) cabal: Error: some packages failed to install: language-c-quote-0.1 depends on syb-0.1.0.3 which
failed to install. syb-0.1.0.3 failed during the building phase. The exception was: exit: ExitFailure 1 The full trace is included below. Here's the version information for the ghc I am running. Kfisher-laptop:/Users/kfisher/pads/dirpads/language-c-quote>~/
sw/ghc-head/bin/ghc --version The Glorious Glasgow Haskell Compilation System,
version 6.13.20100210 The cabal website suggests sending questions to this list... Any suggestions for how to fix this problem? Kathleen kfisher-laptop:/Users/kfisher/pads/dirpads/language-c-quote>~/
.cabal/bin/cabal install -w ~/sw/ghc-head/bin/ghc Resolving dependencies... Downloading mtl-1.1.0.2... Configuring mtl-1.1.0.2... Preprocessing library mtl-1.1.0.2... Building mtl-1.1.0.2... ...stuff deleted... src/Data/Generics.hs:40:1: Warning: The import of `Prelude' is redundant except perhaps to import instances from `Prelude' To import instances alone, use: import Prelude() Registering syb-0.1.0.3... cabal: ghc-pkg: <stdin>: hGetContents: invalid argument
(invalid UTF-8 byte sequence) cabal: Error: some packages failed to install: language-c-quote-0.1 depends on syb-0.1.0.3 which
failed to install. syb-0.1.0.3 failed during the building phase. The exception was: exit: ExitFailure 1 *****************************************************************
Confidentiality Note: The information contained in this message,
and any attachments, may contain confidential and/or privileged
material. It is intended solely for the person(s) or entity to
which it is addressed. Any review, retransmission, dissemination,
or taking of any action in reliance upon this information by
persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the
sender and delete the material from any computer.
***************************************************************** _______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Thanks! I forgot to cc Kathleen herself, so I'm now doing so.
Assuming that's the problem, does it reflect a bug in Cabal, or GHC, or what? And if so, can someone make a ticket?]
Thanks
Simon
From: José Pedro Magalhães [mailto:jpm@cs.uu.nl]
Sent: 23 February 2010 15:10
To: Bayley, Alistair
Cc: Simon Peyton-Jones; GHC users; cvs-ghc@haskell.org
Subject: Re: Installing syb(-0.1.03) package in head version of Haskell
I'm guessing that is indeed the problem, though I cannot reproduce the error (but I'm using Cabal-1.8.0.2).
Assuming this is the cause of the problem, what is the best correction? Encoding the cabal file as UTF-8 or removing the accent? Do earlier versions of cabal deal well with UTF-8?...
Cheers,
Pedro
On Tue, Feb 23, 2010 at 16:05, Bayley, Alistair
-----Original Message----- From: glasgow-haskell-users-bounces@haskell.orgmailto:glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users-bounces@haskell.orgmailto:glasgow-haskell-users-bounces@haskell.org] On Behalf Of Simon Peyton-Jones Sent: 23 February 2010 14:32 To: GHC users Cc: cvs-ghc@haskell.orgmailto:cvs-ghc@haskell.org Subject: FW: Installing syb(-0.1.03) package in head version of Haskell
Friends
Can anyone help Kathleen out? She has a cabal-install issue. I think she's on a Mac.
Many thanks
Simon
From: Kathleen Fisher [mailto:kathleen.fisher@gmail.commailto:kathleen.fisher@gmail.com] Sent: 16 February 2010 22:54 To: Simon Peyton-Jones Subject: Fwd: Installing syb(-0.1.03) package in head version of Haskell
Hi Simon,
I'm trying to get the PADS file we were working on compiling under the HEAD version of Haskell, but I'm having trouble getting the Data.Generics module to install. I sent the question below to the libraries@haskell.orgmailto:libraries@haskell.org last week, but I haven't seen any replies. Is that the right address? Or is there a different place to ask such questions?
Thanks for any pointers!
Kathleen
Begin forwarded message:
From: Kathleen Fisher
mailto:kathleen.fisher@gmail.com> Date: February 11, 2010 2:28:20 PM PST
To: libraries@haskell.orgmailto:libraries@haskell.org
Subject: Installing syb(-0.1.03) package in head version of Haskell
Hi all,
I'm trying to get a program that uses the Data.Generics module to compile under the head version of GHC, but I am having trouble getting the syb package installed.
I believe I am using the most recent version of cabal:
kfisher-laptop:/Users/kfisher/pads/dirpads/language-c-quote>~/ .cabal/bin/cabal --version
cabal-install version 0.8.0
using version 1.8.0.1 of the Cabal library
When I ask cabal to install the syb package, I get the following error:
kfisher-laptop:/Users/kfisher/pads/dirpads/language-c-quote>~/ .cabal/bin/cabal install -w ~/sw/ghc-head/bin/ghc
Resolving dependencies...
Downloading mtl-1.1.0.2...
Configuring mtl-1.1.0.2...
Preprocessing library mtl-1.1.0.2...
...
Registering syb-0.1.0.3...
cabal: ghc-pkg: <stdin>: hGetContents: invalid argument (invalid UTF-8 byte
sequence)
cabal: Error: some packages failed to install:
language-c-quote-0.1 depends on syb-0.1.0.3 which failed to install.
syb-0.1.0.3 failed during the building phase. The exception was:
exit: ExitFailure 1
The full trace is included below.
Here's the version information for the ghc I am running.
Kfisher-laptop:/Users/kfisher/pads/dirpads/language-c-quote>~/ sw/ghc-head/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.13.20100210
The cabal website suggests sending questions to this list...
Any suggestions for how to fix this problem?
Kathleen
kfisher-laptop:/Users/kfisher/pads/dirpads/language-c-quote>~/ .cabal/bin/cabal install -w ~/sw/ghc-head/bin/ghc
Resolving dependencies...
Downloading mtl-1.1.0.2...
Configuring mtl-1.1.0.2...
Preprocessing library mtl-1.1.0.2...
Building mtl-1.1.0.2...
...stuff deleted...
src/Data/Generics.hs:40:1:
Warning: The import of `Prelude' is redundant
except perhaps to import instances from `Prelude'
To import instances alone, use: import Prelude()
Registering syb-0.1.0.3...
cabal: ghc-pkg: <stdin>: hGetContents: invalid argument (invalid UTF-8 byte
sequence)
cabal: Error: some packages failed to install:
language-c-quote-0.1 depends on syb-0.1.0.3 which failed to install.
syb-0.1.0.3 failed during the building phase. The exception was:
exit: ExitFailure 1
***************************************************************** Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. ***************************************************************** _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.orgmailto:Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

On Tue, Feb 23, 2010 at 03:05:56PM -0000, Bayley, Alistair wrote:
Just a wild guess, but the package description has this non-ascii text:
author: Ralf Lämmel, Simon Peyton Jones
It could well be Latin-1 encoded, rather than UTF8.
No, syb-0.1.0.3/syb.cabal is UTF-8-encoded (conforming to the Cabal docs).
Try editing the author field to this:
author: Ralf Laemmel, Simon Peyton Jones
and rebuilding/installing.
If it's a ghc-pkg problem, that might work.

On Tue, Feb 23, 2010 at 10:12 AM, Ross Paterson
On Tue, Feb 23, 2010 at 03:05:56PM -0000, Bayley, Alistair wrote:
Just a wild guess, but the package description has this non-ascii text:
author: Ralf Lämmel, Simon Peyton Jones
It could well be Latin-1 encoded, rather than UTF8.
No, syb-0.1.0.3/syb.cabal is UTF-8-encoded (conforming to the Cabal docs).
I had similar issues when attempting to install a new version of syb over an old version[1]. I had to open this file in emacs: /usr/lib/ghc-6.13/package.conf.d/syb-0.1.0.3.conf and the do: M-x set-buffer-file-coding-system utf-8 I think there was a point in time where something wrote contains to that file as latin1 instead of utf-8 or something. - jeremy [1] it might have actually been the same version of syb, but rebuilt with a different version of the compiler or something..

Ross Paterson schrieb:
On Tue, Feb 23, 2010 at 03:05:56PM -0000, Bayley, Alistair wrote:
Just a wild guess, but the package description has this non-ascii text:
author: Ralf Lämmel, Simon Peyton Jones
It could well be Latin-1 encoded, rather than UTF8.
No, syb-0.1.0.3/syb.cabal is UTF-8-encoded (conforming to the Cabal docs).
My guess would be that the "locale" is not properly set. The environment variable LANG should be set to something shown by "locale -a" (i.e en_GB). Other LC_* variables should not be set. The variables should not be "C" or "POSIX". (I was able to install syb-0.1.0.3 without a problem) Cheers Christian
Try editing the author field to this:
author: Ralf Laemmel, Simon Peyton Jones
and rebuilding/installing.
If it's a ghc-pkg problem, that might work.

On Tue, Feb 23, 2010 at 12:46 PM, Christian Maeder
Ross Paterson schrieb:
On Tue, Feb 23, 2010 at 03:05:56PM -0000, Bayley, Alistair wrote:
Just a wild guess, but the package description has this non-ascii text:
author: Ralf Lämmel, Simon Peyton Jones
It could well be Latin-1 encoded, rather than UTF8.
No, syb-0.1.0.3/syb.cabal is UTF-8-encoded (conforming to the Cabal docs).
My guess would be that the "locale" is not properly set. The environment variable LANG should be set to something shown by "locale -a" (i.e en_GB). Other LC_* variables should not be set. The variables should not be "C" or "POSIX".
(I was able to install syb-0.1.0.3 without a problem)
Cheers Christian
If we're relying on the locale being set properly is the fix then to force <insert tool here> to always read in Cabal package descriptions as UTF-8? Antoine

On 23/02/10 18:46, Christian Maeder wrote:
Ross Paterson schrieb:
On Tue, Feb 23, 2010 at 03:05:56PM -0000, Bayley, Alistair wrote:
Just a wild guess, but the package description has this non-ascii text:
author: Ralf Lämmel, Simon Peyton Jones
It could well be Latin-1 encoded, rather than UTF8.
No, syb-0.1.0.3/syb.cabal is UTF-8-encoded (conforming to the Cabal docs).
My guess would be that the "locale" is not properly set. The environment variable LANG should be set to something shown by "locale -a" (i.e en_GB). Other LC_* variables should not be set. The variables should not be "C" or "POSIX".
(I was able to install syb-0.1.0.3 without a problem)
Both Cabal and ghc-pkg explicitly use UTF-8 for handling .cabal and package configuration files, so if you end up with a Latin-1 file in your package database then something has gone wrong. If anyone can reproduce this problem then please submit a ticket. Cheers, Simon

Simon Marlow schrieb:
On 23/02/10 18:46, Christian Maeder wrote:
Ross Paterson schrieb:
On Tue, Feb 23, 2010 at 03:05:56PM -0000, Bayley, Alistair wrote:
Just a wild guess, but the package description has this non-ascii text:
author: Ralf Lämmel, Simon Peyton Jones
It could well be Latin-1 encoded, rather than UTF8.
No, syb-0.1.0.3/syb.cabal is UTF-8-encoded (conforming to the Cabal docs).
My guess would be that the "locale" is not properly set. The environment variable LANG should be set to something shown by "locale -a" (i.e en_GB). Other LC_* variables should not be set. The variables should not be "C" or "POSIX".
(I was able to install syb-0.1.0.3 without a problem)
Both Cabal and ghc-pkg explicitly use UTF-8 for handling .cabal and package configuration files, so if you end up with a Latin-1 file in your package database then something has gone wrong. If anyone can reproduce this problem then please submit a ticket.
Indeed, I have a latin-1 file /local/maeder/lib/ghc-6.13.20100211/package.conf.d/syb-0.1.0.3-2d8f18fd3343792a85816b191d973cea.conf: ISO-8859 English text and my (accidental) setting is: LANG=de_DE@euro LANGUAGE= LC_ALL=C Cheers Christian My ghc-6.12.1 uses syb-0.1.0.2 (which is ASCII)

On 24/02/2010 10:07, Christian Maeder wrote:
Simon Marlow schrieb:
On 23/02/10 18:46, Christian Maeder wrote:
Ross Paterson schrieb:
On Tue, Feb 23, 2010 at 03:05:56PM -0000, Bayley, Alistair wrote:
Just a wild guess, but the package description has this non-ascii text:
author: Ralf Lämmel, Simon Peyton Jones
It could well be Latin-1 encoded, rather than UTF8.
No, syb-0.1.0.3/syb.cabal is UTF-8-encoded (conforming to the Cabal docs).
My guess would be that the "locale" is not properly set. The environment variable LANG should be set to something shown by "locale -a" (i.e en_GB). Other LC_* variables should not be set. The variables should not be "C" or "POSIX".
(I was able to install syb-0.1.0.3 without a problem)
Both Cabal and ghc-pkg explicitly use UTF-8 for handling .cabal and package configuration files, so if you end up with a Latin-1 file in your package database then something has gone wrong. If anyone can reproduce this problem then please submit a ticket.
Indeed, I have a latin-1 file
/local/maeder/lib/ghc-6.13.20100211/package.conf.d/syb-0.1.0.3-2d8f18fd3343792a85816b191d973cea.conf: ISO-8859 English text
and my (accidental) setting is:
LANG=de_DE@euro LANGUAGE= LC_ALL=C
And you got that by just 'cabal install syb'? What version of cabal-install? (cabal --version) Cheers, Simon

Simon Marlow schrieb:
Both Cabal and ghc-pkg explicitly use UTF-8 for handling .cabal and package configuration files, so if you end up with a Latin-1 file in your package database then something has gone wrong. If anyone can reproduce this problem then please submit a ticket.
Indeed, I have a latin-1 file
/local/maeder/lib/ghc-6.13.20100211/package.conf.d/syb-0.1.0.3-2d8f18fd3343792a85816b191d973cea.conf:
ISO-8859 English text
and my (accidental) setting is:
LANG=de_DE@euro LANGUAGE= LC_ALL=C
And you got that by just 'cabal install syb'? What version of cabal-install? (cabal --version)
No, just by the Setup, configure, build, install procedure. "ghc-pkg describe syb" and "ghc-pkg dump" create UTF-8 output. Christian

On 24/02/2010 11:35, Christian Maeder wrote:
Simon Marlow schrieb:
Both Cabal and ghc-pkg explicitly use UTF-8 for handling .cabal and package configuration files, so if you end up with a Latin-1 file in your package database then something has gone wrong. If anyone can reproduce this problem then please submit a ticket.
Indeed, I have a latin-1 file
/local/maeder/lib/ghc-6.13.20100211/package.conf.d/syb-0.1.0.3-2d8f18fd3343792a85816b191d973cea.conf:
ISO-8859 English text
and my (accidental) setting is:
LANG=de_DE@euro LANGUAGE= LC_ALL=C
And you got that by just 'cabal install syb'? What version of cabal-install? (cabal --version)
No, just by the Setup, configure, build, install procedure.
"ghc-pkg describe syb" and "ghc-pkg dump" create UTF-8 output.
Aha, I think I see where the bug is. Thanks folks, we'll have it fixed in 6.12.2. In the meantime you should use a UTF-8 locale, eg. LANG=en_US.utf8. Cheers, Simon

Simon Marlow schrieb:
On 24/02/2010 11:35, Christian Maeder wrote:
Simon Marlow schrieb:
Both Cabal and ghc-pkg explicitly use UTF-8 for handling .cabal and package configuration files, so if you end up with a Latin-1 file in your package database then something has gone wrong. If anyone can reproduce this problem then please submit a ticket.
Indeed, I have a latin-1 file
/local/maeder/lib/ghc-6.13.20100211/package.conf.d/syb-0.1.0.3-2d8f18fd3343792a85816b191d973cea.conf:
ISO-8859 English text
and my (accidental) setting is:
LANG=de_DE@euro
Right, this is a latin1 locale and the whole compiler was created with this setting. I think "ghc-pkg upate - ..." creates the latin1 file. (I've some latin1 source files that need this setting.)
LANGUAGE= LC_ALL=C
The LANGUAGE variable is properly a left-over typing error and not relevant. And "LC_ALL" does not seem to take precedence over LANG on my (SuSE) system.
And you got that by just 'cabal install syb'? What version of cabal-install? (cabal --version)
No, just by the Setup, configure, build, install procedure.
"ghc-pkg describe syb" and "ghc-pkg dump" create UTF-8 output.
Aha, I think I see where the bug is. Thanks folks, we'll have it fixed in 6.12.2. In the meantime you should use a UTF-8 locale, eg. LANG=en_US.utf8.
It is not sufficient for me to reinstall this package with this utf8 setting. (I think ghc-pkg needs to be fixed or maybe recompiled under utf8.) Cheers Christian

On 24/02/2010 12:28, Christian Maeder wrote:
And you got that by just 'cabal install syb'? What version of cabal-install? (cabal --version)
No, just by the Setup, configure, build, install procedure.
"ghc-pkg describe syb" and "ghc-pkg dump" create UTF-8 output.
Aha, I think I see where the bug is. Thanks folks, we'll have it fixed in 6.12.2. In the meantime you should use a UTF-8 locale, eg. LANG=en_US.utf8.
It is not sufficient for me to reinstall this package with this utf8 setting. (I think ghc-pkg needs to be fixed or maybe recompiled under utf8.)
There was a missing hSetEncoding, so that ghc-pkg is writing this file using the current locale rather than UTF-8, but reading it back as UTF-8. So I'm surprised that temporarily setting your locale to UTF-8 doesn't work around it - what happens? Cheers, Simon

Simon Marlow schrieb:
On 24/02/2010 12:28, Christian Maeder wrote: [...]
It is not sufficient for me to reinstall this package with this utf8 setting. (I think ghc-pkg needs to be fixed or maybe recompiled under utf8.)
There was a missing hSetEncoding, so that ghc-pkg is writing this file using the current locale rather than UTF-8, but reading it back as UTF-8. So I'm surprised that temporarily setting your locale to UTF-8 doesn't work around it - what happens?
No idea, the last step of installing is: Registering syb-0.1.0.3... /local/maeder/bin/ghc-pkg update - --global --no-user-package-conf -v2 The standard input passed to ghc-pkg is utf8 coded (independent of my LANG setting), but the output file written syb-0.1.0.3-2d8f18fd3343792a85816b191d973cea.conf is always ISO-8859. HTH Christian

On 24/02/2010 14:08, Christian Maeder wrote:
Simon Marlow schrieb:
On 24/02/2010 12:28, Christian Maeder wrote: [...]
It is not sufficient for me to reinstall this package with this utf8 setting. (I think ghc-pkg needs to be fixed or maybe recompiled under utf8.)
There was a missing hSetEncoding, so that ghc-pkg is writing this file using the current locale rather than UTF-8, but reading it back as UTF-8. So I'm surprised that temporarily setting your locale to UTF-8 doesn't work around it - what happens?
No idea, the last step of installing is:
Registering syb-0.1.0.3... /local/maeder/bin/ghc-pkg update - --global --no-user-package-conf -v2
The standard input passed to ghc-pkg is utf8 coded (independent of my LANG setting), but the output file written syb-0.1.0.3-2d8f18fd3343792a85816b191d973cea.conf is always ISO-8859.
HTH Christian
It does, thanks. I now realise that the code is using binary mode accidentally, in fact it has an instance of this bug http://hackage.haskell.org/trac/ghc/ticket/3832 because ghc-pkg contains a copy of the code of openTempFile. I'll fix it to use openTempFileWithDefaultPermissions, which does the right thing. Cheers, Simon
participants (8)
-
Antoine Latter
-
Bayley, Alistair
-
Christian Maeder
-
Jeremy Shaw
-
José Pedro Magalhães
-
Ross Paterson
-
Simon Marlow
-
Simon Peyton-Jones