1. 25 Jun, 2004 1 commit
  2. 22 Jun, 2004 1 commit
    • ross's avatar
      [project @ 2004-06-22 12:45:55 by ross] · fc865a71
      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__).
      fc865a71
  3. 15 Jun, 2004 1 commit
  4. 13 Jun, 2004 2 commits
    • panne's avatar
      [project @ 2004-06-13 21:03:46 by panne] · 67a040b2
      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.
      67a040b2
    • panne's avatar
      [project @ 2004-06-13 17:16:40 by panne] · 463eed22
      panne authored
      The FFI report does not mention that CClock and CTime have instances for
      Bounded, Real, Integral, and Bits.
      463eed22
  5. 30 Mar, 2004 1 commit
  6. 25 Feb, 2004 1 commit
  7. 14 Jan, 2004 1 commit
  8. 06 Jan, 2004 2 commits
    • ross's avatar
      [project @ 2004-01-06 14:01:52 by ross] · 2a7b95f8
      ross authored
      fix for Hugs
      2a7b95f8
    • simonmar's avatar
      [project @ 2004-01-06 12:40:00 by simonmar] · fb577d21
      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
      fb577d21
  9. 02 Jan, 2004 1 commit
  10. 29 Dec, 2003 1 commit
  11. 13 Nov, 2003 1 commit
  12. 06 Nov, 2003 1 commit
  13. 05 Nov, 2003 1 commit
  14. 04 Nov, 2003 1 commit
  15. 21 Oct, 2003 2 commits
    • simonmar's avatar
      [project @ 2003-10-21 13:27:13 by simonmar] · e2b681aa
      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).
      e2b681aa
    • simonmar's avatar
      [project @ 2003-10-21 13:24:31 by simonmar] · 41e6e6ff
      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.
      41e6e6ff
  16. 07 Oct, 2003 1 commit
    • sof's avatar
      [project @ 2003-10-07 16:56:33 by sof] · bc906213
      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.
      bc906213
  17. 24 Sep, 2003 1 commit
  18. 23 Sep, 2003 1 commit
  19. 20 Aug, 2003 1 commit
    • panne's avatar
      [project @ 2003-08-20 15:44:19 by panne] · 7c8d57b8
      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.
      7c8d57b8
  20. 01 Aug, 2003 1 commit
    • ross's avatar
      [project @ 2003-08-01 10:00:48 by ross] · 4aa9bf58
      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.
      4aa9bf58
  21. 31 Jul, 2003 1 commit
  22. 29 Jul, 2003 1 commit
  23. 24 Jul, 2003 1 commit
    • ralf's avatar
      [project @ 2003-07-24 12:19:57 by ralf] · 88738f0e
      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.
      88738f0e
  24. 19 Jun, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-06-19 13:20:37 by simonmar] · 586cebc0
      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
      586cebc0
  25. 12 Jun, 2003 5 commits
  26. 29 May, 2003 1 commit
    • malcolm's avatar
      [project @ 2003-05-29 17:37:17 by malcolm] · 1f368719
      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.
      1f368719
  27. 27 May, 2003 1 commit
  28. 23 May, 2003 2 commits
  29. 22 May, 2003 4 commits