Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-16 Thread Ian Lynagh
On Thu, Feb 09, 2012 at 11:40:28AM -0800, John Meacham wrote: On Thu, Feb 9, 2012 at 11:23 AM, Ian Lynagh ig...@earth.li wrote: On Thu, Feb 09, 2012 at 04:52:16AM -0800, John Meacham wrote: Since CSigSet has sigset_t associated with it, 'Ptr CSigSet' ends up turning into 'sigset_t *'

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-16 Thread John Meacham
On Thu, Feb 16, 2012 at 1:20 PM, Ian Lynagh ig...@earth.li wrote: I've now implemented this in GHC. For now, the syntax is: type    {-# CTYPE some C type #-} Foo = ... newtype {-# CTYPE some C type #-} Foo = ... data    {-# CTYPE some C type #-} Foo = ... The magic for (Ptr a) is built in

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-09 Thread John Meacham
On Wed, Feb 8, 2012 at 10:56 AM, Ian Lynagh ig...@earth.li wrote: That sounds right. It basically means you don't have to write the C stubs yourself, which is nice because (a) doing so is a pain, and (b) when the foreign import is inside 2 or 3 CPP conditionals it's even more of a pain to

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-09 Thread Ian Lynagh
On Thu, Feb 09, 2012 at 04:52:16AM -0800, John Meacham wrote: Since CSigSet has sigset_t associated with it, 'Ptr CSigSet' ends up turning into 'sigset_t *' in the generated code. (Ptr (Ptr CChar)) turns into char** and so forth. What does the syntax for associating sigset_t with CSigSet

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-09 Thread John Meacham
On Thu, Feb 9, 2012 at 11:23 AM, Ian Lynagh ig...@earth.li wrote: On Thu, Feb 09, 2012 at 04:52:16AM -0800, John Meacham wrote: Since CSigSet has sigset_t associated with it, 'Ptr CSigSet' ends up turning into 'sigset_t *' in the generated code. (Ptr (Ptr CChar)) turns into char** and so

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-08 Thread Simon Marlow
On 08/02/2012 02:26, John Meacham wrote: On Tue, Feb 7, 2012 at 4:24 AM, Simon Marlowmarlo...@gmail.com wrote: Separately the unix package added support for undecoded FilePaths (RawFilePath), but unfortunately at the same time we started using a new extension in GHC 7.4.1 (CApiFFI), which we

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-08 Thread Ian Lynagh
On Tue, Feb 07, 2012 at 06:26:48PM -0800, John Meacham wrote: Hi, from my reading, it looks like 'capi' means from a logical perspective, Don't assume the object is addressible, but rather that the standard c syntax for calling this routine will expand into correct code when compiled with

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-07 Thread Simon Marlow
On 06/02/2012 20:32, Ian Lynagh wrote: On Sun, Feb 05, 2012 at 07:17:32PM -0800, John Millikin wrote: That was my understanding also, then QuickCheck found a counter-example. It turns out that there are cases where a valid path cannot be roundtripped in the GHC 7.2 encoding. This is fixed in

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-07 Thread John Meacham
On Tue, Feb 7, 2012 at 4:24 AM, Simon Marlow marlo...@gmail.com wrote: Separately the unix package added support for undecoded FilePaths (RawFilePath), but unfortunately at the same time we started using a new extension in GHC 7.4.1 (CApiFFI), which we decided not to document because it was

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-06 Thread Ian Lynagh
On Sun, Feb 05, 2012 at 07:17:32PM -0800, John Millikin wrote: That was my understanding also, then QuickCheck found a counter-example. It turns out that there are cases where a valid path cannot be roundtripped in the GHC 7.2 encoding. This is fixed in GHC 7.4.1. Thanks Ian