Converting [Word8] to CString

2001-09-15 Thread Ashley Yakeley
I'm looking for a function that will convert a [Word8] byte-array to a CString (i.e. a C byte array) for the purposes of FFI. foreign import JVMBridge JVMBridge_FindClass rawFindClass :: JavaVM - CString - IO JVMObjectRef; makeCString :: [Word8] - IO CString; It has to work

Re: Converting [Word8] to CString

2001-09-15 Thread Marcin 'Qrczak' Kowalczyk
Fri, 14 Sep 2001 23:40:42 -0700, Ashley Yakeley [EMAIL PROTECTED] pisze: I'm looking for a function that will convert a [Word8] byte-array to a CString (i.e. a C byte array) for the purposes of FFI. You can use newArray which allocates the C byte array using malloc so it must be freed by

unsafePtrCompare, anybody?

2001-09-15 Thread Leon Smith
I'm writing an atom table for a compiler/interpreter, and it would be really nice to use unsafePtrLT to implement tree-based finite maps. For clarification, my atom table consists of these three functions: mkAtom :: String - IO Atom show :: Atom - String (==) :: Atom - Atom - Bool such

Re: Converting [Word8] to CString

2001-09-15 Thread Ashley Yakeley
At 2001-09-15 02:15, Marcin 'Qrczak' Kowalczyk wrote: Fri, 14 Sep 2001 23:40:42 -0700, Ashley Yakeley [EMAIL PROTECTED] pisze: I'm looking for a function that will convert a [Word8] byte-array to a CString (i.e. a C byte array) for the purposes of FFI. You can use newArray which allocates

Re: The future of Haskell discussion / GUIs

2001-09-15 Thread Manuel M. T. Chakravarty
Johannes Waldmann [EMAIL PROTECTED] wrote, Manuel: ... Functional GUIs like Fruit are from a research perspective very interesting, but their design is rather far from being a solved problem, which makes them a not very likely candidate for a standard that people seem to like to

Re: The future of Haskell discussion

2001-09-15 Thread Manuel M. T. Chakravarty
S. Alexander Jacobson [EMAIL PROTECTED] wrote, If the GUI is based on the IO monad, then it doesn't seem like there is a lot of advantage to doing it in Haskell. It seems like a better idea to use a more natural language for IO and make RPC/interproc calls to a haskell server to get stuff

Re: Application letters at the Haskell workshop: suggestion

2001-09-15 Thread Mark Carroll
Mike - I hope you don't mind passing this to the list - but it's a great, simple explanation of a big problem with my approach. On 14 Sep 2001, Mike Gunter wrote: The problem is not a loss of referential transparency but the requirement that evaluation order must be specified. E.g. what

Re: Application letters at the Haskell workshop: suggestion

2001-09-15 Thread Duncan Coutts
On Fri, 14 Sep 2001, Mark Carroll wrote: (snip) simplistic (but adequate for my immediate needs, which are currently being served with lots of ifs and Maybes!). Oh - and I should add, lots of two-tuple return values which are basically of the form (Maybe a, error details). ): -- Mark

Re: The future of Haskell discussion

2001-09-15 Thread Bill Halchin
Jeff has hit the nail on the head .. thanks Jeff. You said eloquentlywhat I was hinting at or saying very implicit (because I didn't know how to say it eloquently). The "Haskell library" seems to be contributions by individuals (who should be commended!!), butas an "industrial" programmer who

Re: The future of Haskell discussion

2001-09-15 Thread Pixel
Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] writes: Fri, 14 Sep 2001 02:09:21 -0700, Julian Seward (Intl Vendor) [EMAIL PROTECTED] pisze: The lack of any way to interface to C++ is a problem, IMO. I would love to be able to write Haskell programs using Qt and ultimately the KDE

Re: Application letters at the Haskell workshop: suggestion

2001-09-15 Thread Ashley Yakeley
At 2001-09-15 08:31, Mark Carroll wrote: AFAICS a simple way to get out of this is to only have one exception type that carries no information instead of different ones so we can't distinguish one exception from another, but that's obviously not great. Isn't that what 'bottom' is? -- Ashley

Re: Application letters at the Haskell workshop: suggestion

2001-09-15 Thread Mark Carroll
On Sat, 15 Sep 2001, Ashley Yakeley wrote: At 2001-09-15 08:31, Mark Carroll wrote: AFAICS a simple way to get out of this is to only have one exception type that carries no information instead of different ones so we can't distinguish one exception from another, but that's obviously not