Re[2]: [Haskell-cafe] Core packages and locale support

2010-06-27 Thread Bulat Ziganshin
Hello Roman,

Sunday, June 27, 2010, 3:52:54 AM, you wrote:

 I fail to see how it will brake programs. Current programs do not use
 Unicode because it is implemented incorrectly.

i use it. current Linux implementation treats String as sequence of
bytes, and with manual recoding it allows to use filesystems with
any encoding


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Core packages and locale support

2010-06-27 Thread Bulat Ziganshin
Hello Roman,

Sunday, June 27, 2010, 11:07:47 AM, you wrote:

 Currently, FilePath is an alias for String.  Changing FilePath to a real
 type
 Just do not change FilePath, what may be simpler?

if FilePath will become abstract type, it will break all programs
that use it since they use it as String



-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Core packages and locale support

2010-06-27 Thread Bulat Ziganshin
Hello Roman,

Sunday, June 27, 2010, 11:11:59 AM, you wrote:

 No! The target encoding is the current locale. It is a no-brainer to

not necessarily. current locale, encoding of current terminal and
encoding of every filesystem mounted are all different things


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Core packages and locale support

2010-06-27 Thread Bulat Ziganshin
Hello Roman,

Sunday, June 27, 2010, 11:24:16 AM, you wrote:

 O'kay, but IMHO few people want to have a headache with recoding. You
 knew that the implementation was incorrect, why you relied on it?

what is alternative? :)  on windows i've used low-level open()-styly
APIs, on Linux i got the same results with official API



-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Core packages and locale support

2010-06-27 Thread Bulat Ziganshin
Hello Roman,

Sunday, June 27, 2010, 11:28:49 AM, you wrote:
 Just do not change FilePath, what may be simpler?
 if FilePath will become abstract type, it will break all programs
 that use it since they use it as String
 Hello, do you read me? I said: do not change FilePath.

what you mean by abstract type then? :)


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Core packages and locale support

2010-06-27 Thread Bulat Ziganshin
Hello Roman,

Sunday, June 27, 2010, 11:37:24 AM, you wrote:

 No! The target encoding is the current locale. It is a no-brainer to
 not necessarily. current locale, encoding of current terminal and
 encoding of every filesystem mounted are all different things
 And we should stick to the current locale. Problem solved.
 6.3  CString
 The module CString provides routines marshalling Haskell into C strings
 and vice versa. The marshalling converts each Haskell character, 
 representing a Unicode code point, to one or more bytes in a manner 
 that, by default, is determined by the *current locale*.
 The Haskell 98 Foreign Function Interface.

1. it doesn't work on practice. ghc provides simple 8-bit conversion
and i think a lot of code relies on this behavior

2. when you mount external/network volume, it doesn't necessarily has
the same encoding as your current locale



-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Core packages and locale support

2010-06-26 Thread Bulat Ziganshin
Hello Felipe,

Saturday, June 26, 2010, 4:44:20 PM, you wrote:

 Even if we said we don't care, we at least should change
 FilePath to be [Word8], and not [String].  Currently filepaths
 are silently truncated if any codepoint is beyond 255.

and there is no OS except Unix ;)


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Core packages and locale support

2010-06-26 Thread Bulat Ziganshin
Hello Felipe,

Saturday, June 26, 2010, 4:54:16 PM, you wrote:

  Even if we said we don't care, we at least should change
  FilePath to be [Word8], and not [String].  Currently filepaths

 other OSs worked fine, should I use this API (i.e. type FilePath
 = String) to its fullest extent, my program will suddently become
 unportable to all Unix OSs.

but what you propose cannot be used in Windows at all! while current
FilePath still works on Unix, with manual filenames en/decoding

-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe