1. 23 Dec, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-12-23 11:02:15 by simonmar] · 0d7bfe8e
      simonmar authored
      Add the #includes from the rts package to the stub .c file.
      Prior to rev. 1.42, we used to add all the #includes from all enabled
      packages, together with any -#include options from the command-line.
      But since this is auto-generated code and we know exactly which
      #includes are required, this was overkill.
      In rev. 1.42, all #includes except RtsAPI.h were removed from the stub
      .c file.  This was incorrect, because the stub file refers to some
      entities defined in other RTS header files (the StgStablePtr type, and
      deRefStablePtr() for example).
      This change adds the header files from the rts package to the stub .c
      file, fixing some recent test breakages.
  2. 20 Dec, 2002 1 commit
  3. 19 Dec, 2002 14 commits
  4. 18 Dec, 2002 6 commits
    • igloo's avatar
      [project @ 2002-12-18 17:45:30 by igloo] · ab63ff1b
      igloo authored
      Context predicates start with a tcon name, not a type variable
    • igloo's avatar
      [project @ 2002-12-18 17:28:17 by igloo] · d53da8f2
      igloo authored
      Convert Tup [e] and Pat [p] and e, p respectively.
    • simonmar's avatar
      [project @ 2002-12-18 16:29:25 by simonmar] · 854ab9a4
      simonmar authored
      "Auto" packages.
      The big change here is that it is no longer necessary to explicitly
      say '-package X' on the command line if X is a package containing
      hierarchical Haskell modules.  All packages marked "auto" contribute
      to the import path, so their modules are always available.  At link
      time, the compiler knows which packages are actually used by the
      program, and it links in only those libraries needed.
      There's one exception: one-shot linking.  If you link a program using
          ghc -o prog A.o B.o ...
      then you need to explicitly add -package flags for each package
      required (except base & haskell98) because the compiler has no
      information about the package dependencies in this case.
      Package configs have a new field: auto, which is either True or False.
      Non-auto packages must be mentioned on the command-line as usual.
      Non-auto packages are still required for:
        - non-hierarchical libraries (to avoid polluting the module namespace)
        - packages with no Haskell content
        - if you want more than one version of a package, or packages
          providing overlapping functionality where the user must decide
          which one to use.
      Doc changes to follow...
    • simonmar's avatar
      [project @ 2002-12-18 16:15:43 by simonmar] · f6ba57ea
      simonmar authored
      Comment fix.
    • simonmar's avatar
      [project @ 2002-12-18 11:17:15 by simonmar] · 9ae23eae
      simonmar authored
      Correctly describe the stack during a GHCi CCALL instruction to the
      RTS.  The previous hack, temporarily truncating the stack to the
      topmost valid stack frame, didn't work because stack-squeezing tends
      to move the stack around before the call.
      The right thing to do is correctly describe the chunk of ccall args
      with an info table, which is what this change does.  We use a RET_DYN
      info table with the number of non-ptrs from the CCALL instruction.
    • mthomas's avatar
      [project @ 2002-12-18 01:13:37 by mthomas] · 7d434183
      mthomas authored
      Do a George Bush on unused macro arg irritating rich western programmer.
  5. 17 Dec, 2002 5 commits
    • simonmar's avatar
      [project @ 2002-12-17 13:56:00 by simonmar] · f319fdf9
      simonmar authored
      Document -no-link.
    • simonmar's avatar
      [project @ 2002-12-17 13:50:28 by simonmar] · a0928e35
      simonmar authored
      - add -no-link flag (omits link step, except in GHCi)
      - tidy up some informmational messages
    • simonmar's avatar
      [project @ 2002-12-17 12:29:48 by simonmar] · 840871d4
      simonmar authored
      On second thoughts, use memcmp instead.
    • simonmar's avatar
      [project @ 2002-12-17 12:27:30 by simonmar] · 931f16bb
      simonmar authored
      Oops, cmpFS uses strcmp() to compare strings, so it has a '\0'
      terminator requirement.  Fix it to use strncmp() instead.
    • simonmar's avatar
      [project @ 2002-12-17 11:39:41 by simonmar] · 4be8b8b3
      simonmar authored
      Fix recent breakage on the HEAD.  This was caused by the fix to
      Lex.lhs to treat primitive strings as "narrow" FastStrings in all
      cases, rather than Unicode ("wide") FastStrings if the string
      contained a '\0'.  The problem is that narrow FastStrings aren't set
      up to handle strings containing '\0'.  They used to be, but it got
      broken somewhere along the line.
      This commit:
       - remove the '\0' test from unpackCStringBA (it takes a length
         argument anyway), and rename it to unpackNBytesBA.  This fixes
         the bug.
       - remove the '\0' terminator from all strings generated by the
         functions in PrimPacked.  The terminators aren't required,
         as far as I can tell.  This should have a tiny but positive
         effect on compile times.
  6. 13 Dec, 2002 5 commits
    • wolfgang's avatar
      [project @ 2002-12-13 19:17:02 by wolfgang] · 419f4bd4
      wolfgang authored
      Remove Mac OS X-specific code for determining memory layout (no longer needed).
    • wolfgang's avatar
      [project @ 2002-12-13 19:14:58 by wolfgang] · baa5c1a0
      wolfgang authored
      Add missing 'const's
    • simonmar's avatar
      [project @ 2002-12-13 16:04:56 by simonmar] · a634e563
      simonmar authored
      When lexing a primitive string, always make a "narrow" FastString.
      Otherwise when the string contains zeros we get a Unicode string,
      which luckily turns into the right thing when compiled but confuses the
      byte-code generator.
      So this fixes the symptom (byte-code generator can't load files
      generated with happy -ag), but not the real bug (byte-code generator
      can't handle unicode strings).
    • simonmar's avatar
      [project @ 2002-12-13 15:16:29 by simonmar] · c986ed0b
      simonmar authored
      Shortcut when switching evaluators: instead of going round the normal
      scheduler loop, just cut to the chase and run the thread using the
      other evaluator.
      This avoids doing stack squeezing each time we switch evaluators,
      which is an O(n) operation these days, whereas it used to be O(n) the
      first time, and O(1) thereafter if the stack hadn't changed too much.
      This is a problem that we should perhaps address separately, but for
      now the workaround should provide a speed boost to GHCi on the HEAD.
    • simonmar's avatar
      [project @ 2002-12-13 14:43:06 by simonmar] · dcf930ca
      simonmar authored
      Fix bug in stack_frame_sizeW
  7. 12 Dec, 2002 8 commits
    • simonmar's avatar
      [project @ 2002-12-12 17:36:16 by simonmar] · b3016a12
      simonmar authored
      A modification to the way we build link lines.
      Currently the link line is constructed like this, for packages p1, p2 etc.:
        libraries p1 ++ extra_libs p1 ++
        libraries p2 ++ extra_libs p2 ++
        extra_ld_opts p1 ++
        extra_ld_opts p2 ++
      This change makes it follow this pattern:
        libraries p1 ++ extra_libs p1 ++ extra_ld_opts p1 ++
        libraries p2 ++ extra_libs p2 ++ extra_ld_opts p2 ++
      which seems more useful: in particular it means that using foo-config
      (eg. gtk-config) to populate extra_ld_opts should now work properly,
      and extra_libs is no longer strictly speaking needed (you can just use
      -l options in extra_ld_opts and get the same effect).
        - There's now no difference between -l<lib> and -optl-l<lib>
        - GHCi grabs libs from extra_ld_opts as well as extra_libs
    • simonmar's avatar
      [project @ 2002-12-12 16:35:14 by simonmar] · 6d353fcb
      simonmar authored
      Fix to build with 4.08.x
    • simonmar's avatar
      [project @ 2002-12-12 15:17:52 by simonmar] · a0fafeff
      simonmar authored
      Fix some issues with hschooks.c, and hopefully clear up (or at least
      document) the mess regarding which versions of Rts.h and RtsFlags.h
      are included.
    • simonmar's avatar
      [project @ 2002-12-12 15:03:42 by simonmar] · 01774b09
      simonmar authored
      Sigh, I thought I could keep this file private to the RTS, but sadly
      it's needed in order to #include RtsFlags.h, and we advertise
      RtsFlags.h as a way to tweak flags through defaultsHook().  Oh well.
    • simonmar's avatar
      [project @ 2002-12-12 14:35:57 by simonmar] · 16d34c16
      simonmar authored
      - Don't use non-portable autoconfery (this configure script was broken
        with newer autoconfs)
      - Use FPTOOLS_SHEBANG_PERL from aclocal.m4 rather than local copy.
    • simonmar's avatar
      [project @ 2002-12-12 13:28:35 by simonmar] · 3f61e22d
      simonmar authored
      Also install <package>.haddock when we install the docs.
    • ross's avatar
      [project @ 2002-12-12 13:21:46 by ross] · dc813469
      ross authored
      Use ioError instead of throw for IOErrors, in anticipation of
      a change from IOError = Exception to IOError = IOException.
    • simonmar's avatar
      [project @ 2002-12-12 11:53:11 by simonmar] · 7d599828
      simonmar authored
      Make the new info-table construction code word without instance Bits
      Int (i.e. GHC 4.08.x).  This probably makes it more correct, too.