Re: Additions to the FFI API

2000-03-28 Thread Marcin 'Qrczak' Kowalczyk
Wed, 29 Mar 2000 15:00:46 +1000, Manuel M. T. Chakravarty <[EMAIL PROTECTED]> pisze: > > 6) Add HsBool with a mapping to an arbitrary integral C type, see Fergus' > >point about a Haskell API. (Should we guarantee that False maps to 0 and > >True to something <>0?) > > We don't make any

No more additions to the FFI API...

2000-03-28 Thread Andy Gill
Fergus Henderson wrote: > > On 28-Mar-2000, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> wrote: > > Tue, 28 Mar 2000 20:37:24 +1000, Fergus Henderson <[EMAIL PROTECTED]>: Don't mean to be rude chaps, but is there any way you can have this conversation without flooding haskell.org? How about a

Re: Additions to the FFI API

2000-03-28 Thread Fergus Henderson
On 28-Mar-2000, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> wrote: > Tue, 28 Mar 2000 20:37:24 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze: > > > The ANSI/ISO C standard does not guarantee that `wchar_t' will be > > Unicode, or even that it will be large enough to hold Unicode. > > I beli

Re: Additions to the FFI API

2000-03-28 Thread Manuel M. T. Chakravarty
Sven Panne <[EMAIL PROTECTED]> wrote, > Regarding 1. Mapping Haskell types to C types: > === > > 2) It should be *guaranteed* that HsStablePtr and HsAddr are mapped to >void* for the reason mentioned by Manuel. Neverthel

Re: Additions to the FFI API

2000-03-28 Thread Manuel M. T. Chakravarty
Fergus Henderson <[EMAIL PROTECTED]> wrote, > On 28-Mar-2000, Manuel M. T. Chakravarty <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] (Marcin 'Qrczak' Kowalczyk) wrote, > > > What woyld GtkText* map to? GtkText is a typedef to an opaque struct. > > > > One idea that we discussed is that `GtkTe

Re: runtime optimization of haskell

2000-03-28 Thread Fergus Henderson
On 28-Mar-2000, S. Alexander Jacobson <[EMAIL PROTECTED]> wrote: > The issue is not just generating the data for a particular running > instance, but rather: > 1. generating the data from all/many running instances on user machines > 2. sending that data back to the developer for analysis > 3. gen

Solid modeling in Haskell

2000-03-28 Thread Jan Skibinski
Modules Solid, Solid_XML, Solid_tests and Solid_XML_tests are available at www.numeric-quest.com/haskell/solid/ Some blurb follows. Enjoy. Jan ... What we need from a solid modeler is its ability to help us with mundane computatio

Re: Additions to the FFI API

2000-03-28 Thread Manuel M. T. Chakravarty
Fergus Henderson <[EMAIL PROTECTED]> wrote, > On 28-Mar-2000, Manuel M. T. Chakravarty <[EMAIL PROTECTED]> wrote: > > Sven Panne <[EMAIL PROTECTED]> wrote, > > > 1) Although the Haskell 98 report states that Char should be a Unicode > > >character, a plain char is used here. No implementation

Re: Additions to the FFI API

2000-03-28 Thread Manuel M. T. Chakravarty
[EMAIL PROTECTED] (Marcin 'Qrczak' Kowalczyk) wrote, > Tue, 28 Mar 2000 18:25:27 +1000, Manuel M. T. Chakravarty <[EMAIL PROTECTED]> >pisze: > > > One idea that we discussed is that `GtkText*' would map to > > `Ptr GtkText', where `GtkText' is opaque und would indeed be > > implemented as > >

Re: Additions to the FFI API

2000-03-28 Thread Marcin 'Qrczak' Kowalczyk
Tue, 28 Mar 2000 14:52:56 +0200, Sven Panne <[EMAIL PROTECTED]> pisze: > 1) To be honest, I don't know enough about char/wchar_t/Unicode/ISO-10646 >to make suggestions here. Could somebody more knowledgeable make a >proposal how these should be handled in the FFI? Keep in mind that this

let vs. case

2000-03-28 Thread Theo Norvell
Hi. I have a data type data Ok_Err s a = Ok s a and a case expression case ok_err' of ~(Ok s' a) -> ... which involved in a loop (i.e. the ... contains a tail call back to the function containing the case expression). This takes a lot of space. Specifically the space

Re: Additions to the FFI API

2000-03-28 Thread Marcin 'Qrczak' Kowalczyk
Tue, 28 Mar 2000 14:52:56 +0200, Sven Panne <[EMAIL PROTECTED]> pisze: [...] Strange: I agree in every point! > 3) If ISO C has long long (don't know, my copy of Harbison/Steele doesn't >mention it), Int64/Word64 should be made mandatory. C99, the recently approved ISO C standard, does ha

Re: Random numbers (fwd)

2000-03-28 Thread Michael Marte
-- Forwarded message -- Date: Fri, 24 Mar 2000 15:11:46 + (GMT) From: Deryck F Brown <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Random numbers Michael, > stdGens1 :: [StdGen] > stdGens1 = > stdGens' seed > where > stdGens' seed = mkStdGen seed : stdGe

Re: Additions to the FFI API

2000-03-28 Thread Sven Panne
Fergus Henderson wrote: > [...] For prior art, see the `Interfaces.C' package in normative > Annex E of the Ada 95 standard (available via www.ada.org). My Ada is a little bit rusty, but what I've understood from http://lglwww.epfl.ch/Ada/rm95/rm9x-B-03.html is the following: * Interfaces.C c

FFI (Ptr a)

2000-03-28 Thread Malcolm Wallace
> And Ptr is what? > > "type Ptr a = Addr" makes "Ptr a" the same as "Ptr b" for any a,b. But newtype Ptr a = Ptr Addr does not allow Ptr a to equal Ptr b. > IMHO Haskell should allow newtypes in foreign calls (I'm only not sure > if it should require the constructor to be accessible). The

Re: Additions to the FFI API

2000-03-28 Thread Sven Panne
Julian Assange wrote: > Have you looked at the nice (un-)marshaling features of Ocaml? The > implementation is such that fist class functions can be marshaled, > un-marshaled and subsequently executed, even for natively compiled > code. [...] I can't find documentation for the things you mention.

RE: runtime optimization of haskell

2000-03-28 Thread S. Alexander Jacobson
The issue is not just generating the data for a particular running instance, but rather: 1. generating the data from all/many running instances on user machines 2. sending that data back to the developer for analysis 3. generating useful reports on aggregate data Jacob Nielsen says that data fro

Re: Additions to the FFI API

2000-03-28 Thread Sven Panne
*sigh* I never thought that the "last words" on this topic would be easy, but on the other hand I never imagined that ISO/ANSI C, POSIX, Unicode, ISO-10646, Ada95, OCaml, persistent functions, etc. will pop up... It's surely worth having a look at things other people have done, but here are some i

Re: Additions to the FFI API

2000-03-28 Thread Qrczak
On Tue, 28 Mar 2000, Fergus Henderson wrote: > `struct HsStablePtrSomeUserDefinedTypeConstructor *'. > > Actually on second thoughts I think that should perhaps be just > > `struct HsSomeUserDefinedTypeConstructor *' > > and likewise for all the other mappings from `StablePtr' type

Re: Additions to the FFI API

2000-03-28 Thread Marcin 'Qrczak' Kowalczyk
Tue, 28 Mar 2000 20:37:24 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze: > The ANSI/ISO C standard does not guarantee that `wchar_t' will be > Unicode, or even that it will be large enough to hold Unicode. > I believe that the Unicode consortium recommends against using > `wchar_t' for Unicod

Re: Additions to the FFI API

2000-03-28 Thread Fergus Henderson
On 28-Mar-2000, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> wrote: > Tue, 28 Mar 2000 20:14:26 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze: > > > For type constructors like `->', `[]', and `Maybe', which (unlike > > StablePtr) don't have any C equivalent, I think you probably need > > to

Re: Additions to the FFI API

2000-03-28 Thread Fergus Henderson
On 28-Mar-2000, Manuel M. T. Chakravarty <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Marcin 'Qrczak' Kowalczyk) wrote, > > What woyld GtkText* map to? GtkText is a typedef to an opaque struct. > > One idea that we discussed is that `GtkText*' would map to > `Ptr GtkText', where `GtkText' is o

Re: Additions to the FFI API

2000-03-28 Thread Marcin 'Qrczak' Kowalczyk
Tue, 28 Mar 2000 20:14:26 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze: > For type constructors like `->', `[]', and `Maybe', which (unlike > StablePtr) don't have any C equivalent, I think you probably need > to drop the structure, and just keep the top-level type constructor, > thus mappin

Re: Additions to the FFI API

2000-03-28 Thread Fergus Henderson
On 28-Mar-2000, Manuel M. T. Chakravarty <[EMAIL PROTECTED]> wrote: > Sven Panne <[EMAIL PROTECTED]> wrote, > > 1) Although the Haskell 98 report states that Char should be a Unicode > >character, a plain char is used here. No implementation uses Unicode so > >far, and char is what one wan

Re: Additions to the FFI API

2000-03-28 Thread Fergus Henderson
On 28-Mar-2000, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> wrote: > Tue, 28 Mar 2000 12:26:34 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze: > > > It would be fine to have a `typedef void *HsStablePtr'. But it is important > > that you do not lose static type information when exporting Ha

Re: Additions to the FFI API

2000-03-28 Thread Marcin 'Qrczak' Kowalczyk
Tue, 28 Mar 2000 18:25:27 +1000, Manuel M. T. Chakravarty <[EMAIL PROTECTED]> pisze: > One idea that we discussed is that `GtkText*' would map to > `Ptr GtkText', where `GtkText' is opaque und would indeed be > implemented as > > newtype GtkText = GtkText () And Ptr is what? "type Ptr a = A

Just for fun

2000-03-28 Thread Jerzy Karczmarczuk
If you try to exercize some popular Web search engines on: "Haskell Library" you will get this: http://www.vtonly.com/hstydec9.htm Perhaps we should send them the Report? Jerzy Karczmarczuk Caen, France.

Re: Additions to the FFI API

2000-03-28 Thread Manuel M. T. Chakravarty
[EMAIL PROTECTED] (Marcin 'Qrczak' Kowalczyk) wrote, > Tue, 28 Mar 2000 12:26:34 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze: > > > It would be fine to have a `typedef void *HsStablePtr'. > > But it is important that you do not lose static type > > information when exporting Haskell functi