Return-Path: <ffi-bounces@haskell.org>
Received: from localhost (AttitudeAdjuster.cse.unsw.edu.au [127.0.0.1])
	hA6NoYo1026430	for <chak@localhost>; Fri, 7 Nov 2003 10:50:39 +1100
Received: from note.orchestra.cse.unsw.edu.au [129.94.242.24]
	by localhost with POP3 (fetchmail-6.2.0)
	for chak@localhost (single-drop);
	Fri, 07 Nov 2003 10:50:39 +1100 (EST)
Received: From smtp3.unsw.edu.au ([149.171.96.70]) (for
	<chak@cse.unsw.edu.au>) By note
	With Smtp ; Thu, 6 Nov 2003 16:08:05 +1100
Received: from localhost (antivirus-03.services.comms.unsw.EDU.AU
	[149.171.193.82])
	by smtp3.unsw.edu.au (8.11.2/8.11.2) with ESMTP id hA6584O09703
	for <chak@cse.unsw.edu.au>; Thu, 6 Nov 2003 16:08:04 +1100 (EST)
Received: from note.orchestra.cse.unsw.EDU.AU (note.orchestra.cse.unsw.EDU.AU
	[129.94.242.24])
	by smtp.unsw.edu.au (8.11.2/8.11.2) with SMTP id hA6583c09677
	for <chak@cse.unsw.edu.au>; Thu, 6 Nov 2003 16:08:03 +1100 (EST)
Received: From www.haskell.org ([128.36.229.215] == bugs.haskell.org)
	(for <chak@cse.unsw.edu.au>) By note With Smtp ;
	Thu, 6 Nov 2003 16:08:03 +1100
Received: from haskell.cs.yale.edu (unknown [127.0.0.1])
	by www.haskell.org (Postfix) with ESMTP
	id 9CB6B422266; Thu,  6 Nov 2003 00:08:00 -0500 (EST)
Received: from AttitudeAdjuster.cse.unsw.edu.au
	(wireless-165.wireless.cse.unsw.EDU.AU [129.94.233.165])
	by www.haskell.org (Postfix) with ESMTP id 5A567422254
	for <ffi@haskell.org>; Thu,  6 Nov 2003 00:07:59 -0500 (EST)
Received: from localhost (AttitudeAdjuster.cse.unsw.edu.au [127.0.0.1])
	hA657unc023263;	Thu, 6 Nov 2003 16:07:56 +1100
From: Manuel M T Chakravarty <chak@cse.unsw.edu.au>
Sender: ffi-bounces@haskell.org
To: simonmar@microsoft.com
Date: Thu, 06 Nov 2003 16:07:56 +1100 (EST)
Delivered-To: ffi@haskell.org
Message-Id: <20031106.160756.532173483.chak@cse.unsw.edu.au>
In-Reply-To:  =?utf-8?q?=3C3429668D0E777A499EE74A7952C382D10113C13A=40EUR-MS?=
 =?utf-8?q?G-01=2Eeurope=2Ecorp=2Emicrosoft=2Ecom=3E?=
References:  =?utf-8?q?=3C3429668D0E777A499EE74A7952C382D10113C13A=40EUR-MSG?=
 =?utf-8?q?-01=2Eeurope=2Ecorp=2Emicrosoft=2Ecom=3E?=
X-URL: http://www.cse.unsw.edu.au/~chak/
X-fingerprint: EC99 6299 E6EB 2FEA AE4C  08E6 14E9 00EC 27FF 718F
X-Disclaimer: http://www.eng.unsw.edu.au/emaildis.htm
X-Mailer: Mew version 3.1 on XEmacs 21.4.12 (Portable Code)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: ffi@haskell.org
Subject: Re: ANN: H98 FFI Addendum 1.0, Release Candidate 13
X-BeenThere: ffi@haskell.org
X-Mailman-Version: 2.1
Precedence: list
Reply-To: chak@cse.unsw.edu.au
List-Id: The Haskell FFI Mailing List <ffi.haskell.org>
List-Unsubscribe: <http://www.haskell.org/mailman/listinfo/ffi>,
	<mailto:ffi-request@haskell.org?subject=unsubscribe>
List-Archive: <http://haskell.org/pipermail/ffi>
List-Post: <mailto:ffi@haskell.org>
List-Help: <mailto:ffi-request@haskell.org?subject=help>
List-Subscribe: <http://www.haskell.org/mailman/listinfo/ffi>,
	<mailto:ffi-request@haskell.org?subject=subscribe>
Errors-To: ffi-bounces@haskell.org

"Simon Marlow" <simonmar@microsoft.com> wrote,

> > I have put RC 14 at
> > 
> >   http://www.cse.unsw.edu.au/~chak/haskell/ffi/
> > 
> > including all the feedback on RC13.  Please especially have
> > a look at Section 6.3 (Section "CString"), where some of the
> > wording changed.
> 
> The spec is silent on how exactly a Haskell Char is translated to a
> CWchar, and there aren't any conversion functions ala castCharToCCHar /
> castCCharToChar.

Hmm, should we maybe have a `castCharToCwchar' and `castCwcharToChar'?

> So presumably the expected behaviour is that the implementation does its
> best to translate between Unicode Char and whatever encoding the
> prevailing C library is using for wchar.  Any sensible implementation
> will be using Unicode for wchar too, so the translation will be a simple
> no-op, but the C standard doesn't specify this.  Older systems will
> probably have a locale-dependent encoding for wchar.  The GNU C library
> has a slight bug in this regard, too (see previous discussion).
> 
> I expect that when we implement the CWString operations for GHC we won't
> bother with any locale-dependent translations, so the implementation
> will only work on "sensible" systems.
> 
> There is a fair bit that is non-obvious here, so I feel the spec ought
> to say something.

Yes, I agree.  The question is, what do we actually want for
the standard?  Do we want to restrict the standard to only
work for "sensible" systems?  If so, what is the proper
phrase to identify "sensible" systems?

Cheers,
Manuel

_______________________________________________
FFI mailing list
FFI@haskell.org
http://www.haskell.org/mailman/listinfo/ffi
