1. 04 Apr, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Fix Trac #2188: scoping in TH declarations quotes · a27c5f77
      simonpj@microsoft.com authored
      This patch fixes a rather tiresome issue, namely the fact that
      a TH declaration quote *shadows* bindings in outer scopes:
      
        f g = [d| f :: Int
                  f = g
        	    g :: Int
                  g = 4 |]
      
      Here, the outer bindings for 'f' (top-level) and 'g' (local)
      are shadowed, and the inner bindings for f,g should not be
      reported as duplicates.  (Remember they are top-level bindings.)
      
      The actual bug was that we'd forgotten to delete 'g' from the
      LocalRdrEnv, so the type sig for 'g' was binding to the outer
      'g' not the inner one.
      a27c5f77
  2. 03 Apr, 2008 3 commits
  3. 02 Apr, 2008 3 commits
    • simonpj@microsoft.com's avatar
      Fix Trac #2137: report correct location for shadowed binding · 6e55d34a
      simonpj@microsoft.com authored
      The error message generation for a shadowed binding was
      plain wrong, at least where the shadowed binding isn't
      top-level.  Just a typo really -- the fix is trivial.
      6e55d34a
    • simonpj@microsoft.com's avatar
      Fix Trac #2141: invalid record update · 1c9ffbe6
      simonpj@microsoft.com authored
      See Note [Record field lookup] in TcEnv.  The fix here
      is quite straightforward.
      1c9ffbe6
    • Simon Marlow's avatar
      Do not #include external header files when compiling via C · c245355e
      Simon Marlow authored
      This has several advantages:
      
       - -fvia-C is consistent with -fasm with respect to FFI declarations:
         both bind to the ABI, not the API.
      
       - foreign calls can now be inlined freely across module boundaries, since
         a header file is not required when compiling the call.
      
       - bootstrapping via C will be more reliable, because this difference
         in behavour between the two backends has been removed.
      
      There is one disadvantage:
      
       - we get no checking by the C compiler that the FFI declaration
         is correct.
      
      So now, the c-includes field in a .cabal file is always ignored by
      GHC, as are header files specified in an FFI declaration.  This was
      previously the case only for -fasm compilations, now it is also the
      case for -fvia-C too.
      c245355e
  4. 30 Mar, 2008 1 commit
  5. 29 Mar, 2008 32 commits