- 25 Jun, 2004 1 commit
-
-
ross authored
more Ptr/FunPtr documentation
-
- 22 Jun, 2004 1 commit
-
-
ross authored
Change the interface (but not the implementation) to match the FFI spec: * added charIsRepresentable, *CAString and *CWString * currently (and in violation of the spec), fooCString = fooCAString * The WString versions use UTF-16 under Windows and UTF-32 elsewhere (valid only if the compiler defines __STDC_ISO_10646__).
-
- 15 Jun, 2004 1 commit
-
-
malcolm authored
Add missing instances of Data.Bits.Bits for nhc98.
-
- 13 Jun, 2004 2 commits
-
-
panne authored
Changes related to arithmetic types: * Renamed macros NUMERIC_FOO to ARITHMETIC_FOO to match C99-speak * ARITHMETIC_TYPEs now have a Real instance, otherwise they are quite useless. Note that this differs from the FFI spec, but the spec should very probably changed in this respect. * Some changes to fix the wrong assumption that CTime/CClock are integral types, C99 in fact guarantees only that they are arithmetic types. This has been accomplished by using realToInteger = round . realToFrac :: Real a => a -> Integer instead of fromIntegral for CTime/CClock. I'm not sure if we could do better, going via Double seems to be overkill, but I couldn't think of a better way. GHC could e.g. use RULES here. Improvements welcome.
-
panne authored
The FFI report does not mention that CClock and CTime have instances for Bounded, Real, Integral, and Bits.
-
- 30 Mar, 2004 1 commit
-
-
panne authored
Added withArrayLen and withArrayLen0
-
- 25 Feb, 2004 1 commit
-
-
krasimir authored
Added finalizeForeignPtr function
-
- 14 Jan, 2004 1 commit
-
-
malcolm authored
Unbreak for nhc98 after recent errno changes.
-
- 06 Jan, 2004 2 commits
-
-
ross authored
fix for Hugs
-
simonmar authored
Fix, and simplify, the getting/setting of errno in Foreign.C.Error. It was previously wrong: although we called a C function to get the location of errno (correct), we cached the result in a CAF which was wrong because the location is OS thread dependent. We must call the C function every time we need the value of errno. I also simplified things by making the getter/setter functions inlined in the same way as the other C fragments in this library, and putting them in HsBase.h. MERGE TO STABLE
-
- 02 Jan, 2004 1 commit
-
-
panne authored
Annual copyright update
-
- 29 Dec, 2003 1 commit
-
-
panne authored
Updated my email address
-
- 13 Nov, 2003 1 commit
-
-
ross authored
Hugs-only tweak
-
- 06 Nov, 2003 1 commit
-
-
simonmar authored
Doc wibbles
-
- 05 Nov, 2003 1 commit
-
-
ross authored
doc updates for mallocForeignPtr and friends
-
- 04 Nov, 2003 1 commit
-
-
ross authored
Hugs only: add finalizers with environments, as per the latest FFI draft.
-
- 21 Oct, 2003 2 commits
-
-
simonmar authored
Make peekArray0 run in constant stack-space by testing the length of the array first, then calling peekArray (which works backwards from the end so it can be tail-recursive).
-
simonmar authored
Make the GHC implementation of peekCString run in constant stack-space by checking the length of the array first and then working backwards from the end. Interestingly, this version is faster than the original.
-
- 07 Oct, 2003 1 commit
-
-
sof authored
peekCString{Len}: tweak GHC impls (why are these provided anyway?) - Do as for Foreign.Marshal.Array.peekArray and read in length-bounded string back-to-front. - force evaluation of CChar->Char conversions. merge to STABLE.
-
- 24 Sep, 2003 1 commit
-
-
simonmar authored
Add some realToFrac rules for CFloat,CDouble and CLDouble, so that eg. realToFrac :: CDouble -> Double turns into a no-op.
-
- 23 Sep, 2003 1 commit
-
-
panne authored
Unbreak Show instance for Ptr caused by the changes to showHex merge to STABLE
-
- 20 Aug, 2003 1 commit
-
-
panne authored
* Cleaned up FP_CHECK_ALIGNMENT test a bit. * Nuked FPTOOLS_CHECK_CCONST test in favour of a more general one which handles cross compilation and languages different from C.
-
- 01 Aug, 2003 1 commit
-
-
ross authored
Swapped argument order of `newForeignPtr' and `addForeignPtrFinalizer' to track FFI spec. (Maybe the Conc ones should do the same?) This will break NHC.
-
- 31 Jul, 2003 1 commit
-
-
panne authored
Merge Foreign.C.TypesISO into Foreign.C.Types
-
- 29 Jul, 2003 1 commit
-
-
ross authored
trim imports
-
- 24 Jul, 2003 1 commit
-
-
ralf authored
Major refactoring of Data/Generics. This also affects the compiler (because of deriving issues). This is an intermediate commit. The library is supposed to compile fine. But the deriving stuff for Data needs to be revised. The testsuite for Data/Generics will not pass. gread is broken at the moment. So it is strongly recommended not to cvs upd for a few hours or a day. Detailed description of changes: - Split up Data/Dynamic into Data/Typeable and Data/Dynamic. (This makes clear what part is about TypeReps and cast vs. dynamics. The latter is not needed by Data/Generics.) - Renamed Data/include/Dynamic.h -> Typeable.h to end confusion. - Split up Data/Generics.hs in a set of modules. - Revised class Data: - Got rid of gunfold but added fromConstr as more primtive one - Revised representations of constructors - Revised treatment of primitive types - Revised type of gmapQ; preserved old gmapQ as gmapL - Added a module Data/Types.hs for treatment of types as values. This is going somewhere.
-
- 19 Jun, 2003 1 commit
-
-
simonmar authored
Fix reallocBytes: when size is zero, it is supposed to act like free. Which it did, except that we were complaining about the NULL return value from C's realloc and reporting it as an error. MERGE TO STABLE
-
- 12 Jun, 2003 5 commits
-
-
ross authored
move portable newForeignPtr from GHC.ForeignPtr to Foreign.ForeignPtr
-
malcolm authored
... and add newForeignPtr_ for nhc98.
-
malcolm authored
For nhc98, define mallocForeignPtr and friends.
-
simonmar authored
Update to latest revision of the FFI spec: - foreignPtrToPtr is now unsafeForeignPtrToPtr - newForeignPtr_ added.
-
malcolm authored
For nhc98, temporarily make foreignPtrToPtr an alias for unsafeForeignPtrToPtr until ghc and hugs catch up.
-
- 29 May, 2003 1 commit
-
-
malcolm authored
For nhc98 only, export the basic C types non-abstractly. This is due to a deficiency in the way newtypes are handled in interface files - the compiler needs full information about the newtype in order to pass values across the FFI.
-
- 27 May, 2003 1 commit
-
-
malcolm authored
Unbreak for nhc98, after the addition of FinalizerPtr as a type synonym, and the change of Foreign.C.Types to export all newtypes abstract.
-
- 23 May, 2003 2 commits
- 22 May, 2003 4 commits
-
-
ross authored
unbreak for Hugs
-
ross authored
export architecture-dependent types opaquely.
-
chak authored
Added a `FinalizerPtr' synonym as in the FFI Addendum (RC 10). ** ATTENTION ** This will break the "#ifdef __NHC__" and "#ifdef __HUGS__" variants of `ForeignPtr'. See `GHC/ForeignPtr.hs' for the definitions.
-
ross authored
trim import
-