1. 22 May, 2001 8 commits
    • simonpj's avatar
      [project @ 2001-05-22 13:43:14 by simonpj] · f16228e4
      simonpj authored
      -------------------------------------------
      	Towards generalising 'foreign' declarations
      	-------------------------------------------
      
      This is a first step towards generalising 'foreign' declarations to
      handle langauges other than C.  Quite a lot of files are touched,
      but nothing has really changed.  Everything should work exactly as
      before.
      
      	But please be on your guard for ccall-related bugs.
      
      Main things
      
      Basic data types: ForeignCall.lhs
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      * Remove absCSyn/CallConv.lhs
      
      * Add prelude/ForeignCall.lhs.  This defines the ForeignCall
        type and its variants
      
      * Define ForeignCall.Safety to say whether a call is unsafe
        or not (was just a boolean).  Lots of consequential chuffing.
      
      * Remove all CCall stuff from PrimOp, and put it in ForeignCall
      
      
      Take CCallOp out of the PrimOp type (where it was always a glitch)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      * Add IdInfo.FCallId variant to the type IdInfo.GlobalIdDetails,
      	along with predicates Id.isFCallId, Id.isFCallId_maybe
      
      * Add StgSyn.StgOp, to sum PrimOp with FCallOp, because it
        *is* useful to sum them together in Stg and AbsC land.  If
        nothing else, it minimises changes.
      
      
      Also generally rename "CCall" stuff to "FCall" where it's generic
      to all foreign calls.
      f16228e4
    • simonmar's avatar
      [project @ 2001-05-22 13:22:14 by simonmar] · 7df73aa7
      simonmar authored
      Clarify what NON_POSIX_SOURCE is needed for (S_ISSOCK namely).  This
      module is probably badly named.  Anyway, things will likely change in
      this area shortly when the Win32 port happens.
      7df73aa7
    • rrt's avatar
      [project @ 2001-05-22 12:00:05 by rrt] · e48d54da
      rrt authored
      Add changes for latest 4.08.2 InstallShield; merge into 4.08 branch,
      especially as the HEAD story will soon change with the New Improved Windows
      System for GHC 5.
      e48d54da
    • rrt's avatar
      [project @ 2001-05-22 11:55:56 by rrt] · 27ed7e0e
      rrt authored
      Update for the latest 4.08.2 InstallShield. This will also be merged into
      the 4.08 branch, and will change again shortly (for the better) with the New
      Scheme that GHC 5 for Windows will use.
      27ed7e0e
    • simonmar's avatar
      [project @ 2001-05-22 11:29:04 by simonmar] · 6ff2ef46
      simonmar authored
      Add -L$(FPTOOLS_TOP_ABS)/ghc/rts/gmp to the link flags (noticed by:
      Lennart).
      6ff2ef46
    • simonmar's avatar
      [project @ 2001-05-22 11:03:47 by simonmar] · 21cbb725
      simonmar authored
      - add missing .gz suffix to -hc.tar file.
      - clean up hc-bundle droppings
      21cbb725
    • simonmar's avatar
      [project @ 2001-05-22 10:38:57 by simonmar] · 452e4fc2
      simonmar authored
      - Recurse on 'distclean', otherwise we don't get to remove hsc2hs-inplace
      - Remove 'veryclean' target which doesn't exist any more
      452e4fc2
    • simonmar's avatar
      [project @ 2001-05-22 10:34:07 by simonmar] · c532ff60
      simonmar authored
      Add a rule to build an hc-file tar bundle.
      c532ff60
  2. 21 May, 2001 14 commits
  3. 20 May, 2001 1 commit
  4. 19 May, 2001 2 commits
    • qrczak's avatar
      [project @ 2001-05-19 20:20:56 by qrczak] · 64eab5d0
      qrczak authored
      Make ghc compilable with itself after the implementation of handle
      IO changed, by changing an ugly mess of #ifdefs and low-level
      ghc-internals-specific kludges into a yet uglier mess with more
      #ifdefs and kludges.
      
      Wouldn't Haskell 98 implementation of a lexer be fast enough? :-)
      
      This won't compile with older versions of ghc-5.01. You may temporarily
      change 501 to 502 in #ifdefs here, or use an older ghc.
      
      The compiler still doesn't work at all when compiled with itself:
      it writes complete nonsense into .hc files.
      
      A remaining error: ghc/lib/std doesn't link PrelHandle_hsc.o into
      libHSstd.a. Function read_wrap is inline but for some reason it's
      needed for linking some programs (e.g. ghc itself).
      64eab5d0
    • qrczak's avatar
      [project @ 2001-05-19 08:02:37 by qrczak] · ce39729d
      qrczak authored
      Implementation of locking in cbits is bogus. Disable it for now.
      ce39729d
  5. 18 May, 2001 15 commits
    • qrczak's avatar
      [project @ 2001-05-18 22:40:52 by qrczak] · a1da5586
      qrczak authored
      I'm too young to remember times when ghc didn't use gmp...
      a1da5586
    • qrczak's avatar
      [project @ 2001-05-18 22:34:42 by qrczak] · 423151c7
      qrczak authored
      Install lockFile.h.
      423151c7
    • qrczak's avatar
      [project @ 2001-05-18 22:13:28 by qrczak] · 9b89741d
      qrczak authored
      Remove bogus comment.
      9b89741d
    • qrczak's avatar
      [project @ 2001-05-18 21:57:30 by qrczak] · 548865d3
      qrczak authored
      s'/n -> /r/n'\n -> \r\n' in a comment.
      548865d3
    • qrczak's avatar
      [project @ 2001-05-18 21:46:58 by qrczak] · 469442fa
      qrczak authored
      Put back importing Monad, as it doesn't need Prelude anymore.
      469442fa
    • qrczak's avatar
      [project @ 2001-05-18 21:45:43 by qrczak] · 93a3a84a
      qrczak authored
      Don't export throwErrnoIfRetry_ twice.
      93a3a84a
    • qrczak's avatar
      [project @ 2001-05-18 21:19:11 by qrczak] · 684aa58c
      qrczak authored
      Remove and don't install: stgio.h, stgerror.h, fileObject.h.
      684aa58c
    • qrczak's avatar
      [project @ 2001-05-18 21:18:17 by qrczak] · ab514628
      qrczak authored
      Make stg_gc_unpt_r1 known to the linker.
      ab514628
    • qrczak's avatar
      [project @ 2001-05-18 18:27:20 by qrczak] · 0ae11b0a
      qrczak authored
      Prelude isn't available yet.
      0ae11b0a
    • simonmar's avatar
      [project @ 2001-05-18 16:54:04 by simonmar] · d9af408e
      simonmar authored
      I/O library rewrite
      -------------------
      
      This commit replaces the old C/Haskell I/O implementation with a new
      Haskell-only one using the new FFI & hsc2hs.
      
      main points:
      
         - lots of code deleted: we're about 3000 lines of C lighter,
           but the amount of Haskell code is about the same.
      
         - performance is ok: some operations are faster, others are
           slower.  There's still some tuning to do, though.
      
         - the new library is designed to handle read/write streams
           much better: a read/write stream gets a special kind of
           handle internally called a "DuplexHandle", which actually
           contains two separate handles, one for writing and one for
           reading.  The upshot is that you can do simultaneous reading
           and writing to/from a socket or FIFO without any locking
           problems.  The effect is similar to calling socketToHandle
           twice, except that finalization works properly (creating
           two separate Handles could lead to the socket being closed
           too early when one of the Handles is GC'd).
      
         - hConnectTo and withHandleFor are gone (no one responded to
           my mail on GHC users, but we can always bring 'em back if
           necessary).
      
         - I made a half-hearted attempt at keeping the system-specific
           code in one place: see PrelPosix.hsc.
      
         - I've rearranged the I/O tests and added lots more.
           ghc/tests/lib/IO now contains Haskell 98-only IO tests,
           ghc/test/lib/{IOExts, Directory, Time} now contain tests for
           the relevant libraries.  I haven't quite finished in here yet,
           the IO tests work but the others don't yet.
      
         - I haven't done anything about Unicode yet, but now we can
           start to discuss what needs doing here.  The new library
           is using MutableByteArrays for its buffers because that
           turned out to be a *lot* easier (and quicker) than malloc'd
           buffers - I hope this won't cause trouble for unicode
           translations though.
      
      WARNING: Windows users refrain from updating until we've had a chance
      to fix any issues that arise.
      
      Testing: the basic H98 stuff has been pretty thoroughly tested, but
      the new duplex handle stuff is still a little green.
      d9af408e
    • simonmar's avatar
      [project @ 2001-05-18 14:18:34 by simonmar] · 5f6f9085
      simonmar authored
      Allow unboxing strict fields through newtypes.
      5f6f9085
    • simonmar's avatar
      [project @ 2001-05-18 09:18:05 by simonmar] · 9213df4a
      simonmar authored
      Remove more ugen droppings.
      9213df4a
    • simonmar's avatar
      [project @ 2001-05-18 09:16:59 by simonmar] · e63a226a
      simonmar authored
      Remove lingering stains left by ugen.
      e63a226a
    • simonmar's avatar
      [project @ 2001-05-18 09:14:42 by simonmar] · f12fa187
      simonmar authored
      use HSC2HS_OPTS
      f12fa187
    • simonmar's avatar
      [project @ 2001-05-18 09:14:20 by simonmar] · 27e96f5e
      simonmar authored
      Add HSC2HS_OPTS
      27e96f5e