On Wed, Apr 20, 2005 at 02:47:05AM +0100, [EMAIL PROTECTED] wrote:
> Thanks for the patient explanation.  I know it's too late, but ...
> 
> > The locale based filename thing in hugs is also a concern, though, in my
> > opinion. Currently two packages build-depend on hugs: haskell-utils and
> > cpphs. I think haskell-utils currently only uses filenames containing
> > a-zA-Z0-9./_ so we could wrap that in a script that sets the locale to C
> > (or maybe do that at the start of main?).
> 
> That shouldn't be necessary -- all the locales in Debian agree with C
> on ASCII-only text.

Ah, that would be convenient. I've just done a quick test and they all
seem OK except vi_VN.TCVN (both with latest CVS and the release):

-----------------------------------------------------------
$ export HUGSDIR=hugsdir
$ LC_ALL=vi_VN.TCVN src/hugs
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Report bugs to: hugs-bugs@haskell.org
||   || Version: 20050421       _________________________________________

Haskell 98 mode: Restart with command line option -98 to enable extensions

ERROR "hugsdir/libraries/Hugs/Prelude.hs":1 - Unrecognised character `\0' in 
column 1

FATAL ERROR: Unable to load Prelude
$ 
-----------------------------------------------------------

> > cpphs currently accepts 8-bit
> > chars in filenames being #included, as does cpp; maybe you will argue
> > that making use of that is foolish, but nevertheless I think I would
> > rather drop the ability to "compile" with hugs in order to keep its
> > behaviour consistent.
> 
> Do you mean #include's in the source file, which is read in text mode?

It is currently, but with new hugs I think it should really be being
read in binary mode and cpphs then do its own line ending magic.

Reading in binary mode doesn't fix the filename issue AFAICS, though;
with:

main = do h <- openBinaryFile "w" ReadMode
          s <- hGetLine h
          removeDirectory s

I get:

19704 read(3, "Foo\302\243bar\n\n", 4096) = 10
19704 rmdir("Foo??bar")                 = -1 ENOENT (No such file or directory)

> > We'll also have to go over any packages that stay using hugs to make
> > sure they are opening files in binary mode when appropriate etc. (In
> > principle this should be done regardless, but within the systems Debian
> > currently supports it's not been an issue thus far).
> 
> Hugs is Suggest'ed by ctklight, haskell-mode, haskell-utils and
> haskell-doc.  Presumably ctklight is in the same boat as cpphs.

Hmm, thanks. Given it's only a suggests I imagine it's only generated
code that actually uses hugs, although it seems odd it doesn't also
suggest ghc[56]. Looks like something for us to check out, anyway  :-)

> It's a tradeoff, I just don't think it's a grave bug.

The severity of Debian bug 299702 is just the mechanism used to keep the
package out of testing.


Thanks
Ian



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to