Haskell 2010: libraries

Ross Paterson ross at soi.city.ac.uk
Sat Jul 11 07:14:05 EDT 2009


On Sat, Jul 11, 2009 at 08:54:14PM +1000, Manuel M T Chakravarty wrote:
> Ross Paterson:
>> The FFI spec refers to types Int8, Int16, Int32, Int64, Word8, Word16,
>> Word32, Word64, Ptr a, FunPtr a and StablePtr a.  Perhaps they should
>> move to the Prelude when the non-library part of the FFI spec is
>> incorporated into the Report?
>
> If we have these types in the Prelude, the associated functions should  
> be in the Prelude, too, and I'd be reluctant to include operations that 
> are not memory-safe in the Prelude.  So, I think, we need at least a 
> standard library for the FFI.  (In the FFI spec, we after all went to a 
> lot of trouble to realise as much as possible of the needed  
> functionality as libraries, to change the core language as little as  
> possible.)

The difference is that the types are used by the core language definition
(section 3.2 of the FFI Addendum), and the functions aren't.


More information about the Haskell-prime mailing list