1. 19 Dec, 2002 8 commits
  2. 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
      ab63ff1b
    • 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.
      d53da8f2
    • 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...
      854ab9a4
    • simonmar's avatar
      [project @ 2002-12-18 16:15:43 by simonmar] · f6ba57ea
      simonmar authored
      Comment fix.
      f6ba57ea
    • 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.
      9ae23eae
    • 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.
      7d434183
  3. 17 Dec, 2002 5 commits
    • simonmar's avatar
      [project @ 2002-12-17 13:56:00 by simonmar] · f319fdf9
      simonmar authored
      Document -no-link.
      f319fdf9
    • 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
      a0928e35
    • simonmar's avatar
      [project @ 2002-12-17 12:29:48 by simonmar] · 840871d4
      simonmar authored
      On second thoughts, use memcmp instead.
      840871d4
    • 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.
      931f16bb
    • 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.
      
      MERGE TO STABLE
      4be8b8b3
  4. 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).
      419f4bd4
    • wolfgang's avatar
      [project @ 2002-12-13 19:14:58 by wolfgang] · baa5c1a0
      wolfgang authored
      Add missing 'const's
      baa5c1a0
    • 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).
      a634e563
    • 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.
      c986ed0b
    • simonmar's avatar
      [project @ 2002-12-13 14:43:06 by simonmar] · dcf930ca
      simonmar authored
      Fix bug in stack_frame_sizeW
      dcf930ca
  5. 12 Dec, 2002 10 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).
      
      Also:
      
        - There's now no difference between -l<lib> and -optl-l<lib>
        - GHCi grabs libs from extra_ld_opts as well as extra_libs
      b3016a12
    • simonmar's avatar
      [project @ 2002-12-12 16:35:14 by simonmar] · 6d353fcb
      simonmar authored
      Fix to build with 4.08.x
      6d353fcb
    • 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.
      a0fafeff
    • 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.
      01774b09
    • 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.
      16d34c16
    • simonmar's avatar
      [project @ 2002-12-12 13:28:35 by simonmar] · 3f61e22d
      simonmar authored
      Also install <package>.haddock when we install the docs.
      3f61e22d
    • 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.
      dc813469
    • 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.
      7d599828
    • mthomas's avatar
      [project @ 2002-12-12 03:19:12 by mthomas] · d096b315
      mthomas authored
      Towards a complete binary package.
      d096b315
    • mthomas's avatar
      [project @ 2002-12-12 03:15:41 by mthomas] · 7c6bd4d7
      mthomas authored
      Towards a MinGW32 binary distribution with all accessories + compiler.
      7c6bd4d7
  6. 11 Dec, 2002 6 commits
    • simonpj's avatar
      [project @ 2002-12-11 17:09:08 by simonpj] · f7e4ca26
      simonpj authored
      Back out the function tycon kind change (big comment to explain why)
      f7e4ca26
    • simonpj's avatar
      [project @ 2002-12-11 16:55:04 by simonpj] · 63e510b5
      simonpj authored
      Tidy up info table generation
      63e510b5
    • simonmar's avatar
      [project @ 2002-12-11 16:37:44 by simonmar] · 0eb87ce8
      simonmar authored
      Remove tests for text/data boundary symbols.
      0eb87ce8
    • simonmar's avatar
      [project @ 2002-12-11 16:37:16 by simonmar] · a13a41c2
      simonmar authored
      Remove tests for text/data section boundary symbols.
      a13a41c2
    • simonmar's avatar
      [project @ 2002-12-11 15:36:20 by simonmar] · 0bffc410
      simonmar authored
      Merge the eval-apply-branch on to the HEAD
      ------------------------------------------
      
      This is a change to GHC's evaluation model in order to ultimately make
      GHC more portable and to reduce complexity in some areas.
      
      At some point we'll update the commentary to describe the new state of
      the RTS.  Pending that, the highlights of this change are:
      
        - No more Su.  The Su register is gone, update frames are one
          word smaller.
      
        - Slow-entry points and arg checks are gone.  Unknown function calls
          are handled by automatically-generated RTS entry points (AutoApply.hc,
          generated by the program in utils/genapply).
      
        - The stack layout is stricter: there are no "pending arguments" on
          the stack any more, the stack is always strictly a sequence of
          stack frames.
      
          This means that there's no need for LOOKS_LIKE_GHC_INFO() or
          LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know
          how to find the boundary between the text and data segments (BIG WIN!).
      
        - A couple of nasty hacks in the mangler caused by the neet to
          identify closure ptrs vs. info tables have gone away.
      
        - Info tables are a bit more complicated.  See InfoTables.h for the
          details.
      
        - As a side effect, GHCi can now deal with polymorphic seq.  Some bugs
          in GHCi which affected primitives and unboxed tuples are now
          fixed.
      
        - Binary sizes are reduced by about 7% on x86.  Performance is roughly
          similar, some programs get faster while some get slower.  I've seen
          GHCi perform worse on some examples, but haven't investigated
          further yet (GHCi performance *should* be about the same or better
          in theory).
      
        - Internally the code generator is rather better organised.  I've moved
          info-table generation from the NCG into the main codeGen where it is
          shared with the C back-end; info tables are now emitted as arrays
          of words in both back-ends.  The NCG is one step closer to being able
          to support profiling.
      
      This has all been fairly thoroughly tested, but no doubt I've messed
      up the commit in some way.
      0bffc410
    • igloo's avatar
      [project @ 2002-12-11 14:02:28 by igloo] · a63622cc
      igloo authored
      Handle bindings to just a pattern variable in cvtd.
      a63622cc