1. 13 May, 2009 3 commits
    • simonpj@microsoft.com's avatar
      Improve error reporting for kind errors (fix Trac #1633) · 9a4ef343
      simonpj@microsoft.com authored
      A long-standing improvement to the error message for kinds. Now instead of
          Expected kind `* -> *', but `Int' has kind `*'
      we get
          The first argument of `T' should have kind `* -> *',
          but `Int' has kind `*'
      
      Ha!
      9a4ef343
    • simonpj@microsoft.com's avatar
      Fix Trac #3219: type of a record update · 80d071f6
      simonpj@microsoft.com authored
      Record updates are amazingly hard to typecheck right.  This is one place
      where GHC's policy of typechecking the original source is much harder than
      desugaring and typechecking that!
      
      Anyway, the bug here is that to compute the 'fixed' type variables I was
      only looking at one constructor rather than all the relevant_cons
      
      Test is typecheck/should_compile/T3219, which GHC 6.10 barfs on (with Lint).
      80d071f6
    • simonpj@microsoft.com's avatar
      Add comments · 63168f87
      simonpj@microsoft.com authored
      63168f87
  2. 01 May, 2009 2 commits
    • Duncan Coutts's avatar
      Link the rts shared libs against gmp and the other C libs · 2b7f450a
      Duncan Coutts authored
      When using shared libs we should link each lib against its deps. This allows
      the dynamic linker to chase dependencies and means we do not have to specify
      all indirect dependencies (as we must do for static libs).
      2b7f450a
    • Duncan Coutts's avatar
      Make ghc -dynamic imply -fPIC for C code · 431e40e1
      Duncan Coutts authored
      As is already the case for ghc -fPIC. This is needed because ghc -dynamic
      means to generate code that is capable of being linked to Haskell shared
      libs and for C code the equivalent is -fPIC. Normally C code does not need
      -fPIC merely to link to shared libs however Haskell shared libs do not
      follow common conventions. In particular the static data cannot be
      referenced statically because it cannot be copied by the static linker.
      The linker cannot copy them because we do not specify a .size for the
      _closure entries (in the .data section) though in principle we could.
      431e40e1
  3. 13 May, 2009 4 commits
  4. 22 Apr, 2009 1 commit
  5. 13 May, 2009 1 commit
  6. 11 May, 2009 3 commits
  7. 08 May, 2009 1 commit
  8. 12 May, 2009 1 commit
    • simonpj@microsoft.com's avatar
      Improve error messages for type functions · da2e18b9
      simonpj@microsoft.com authored
      Following a suggestion of Claus Reinke, this patch improves the error
      messages involving type functions.  Here's the relevant note from TcTyFuns.
      
      Note [Non-injective type functions]
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      It's very confusing to get a message like
           Couldn't match expected type `Depend s'
                  against inferred type `Depend s1'
      so pp_open_tc adds:
             NB: `Depend' is a (non-injective) type function
      
      Currently we add this independently for each argument, so we also get
           Couldn't match expected type `a'
                  against inferred type `Dual (Dual a)'
             NB: `Dual' is a (non-injective) type function
      which is arguably redundant.  But on the other hand, it's probably
      a good idea for the programmer to know the error involves type functions
      so I've left it in for now.  The obvious alternative is to only add
      this NB in the case of matching (T ...) ~ (T ...). 
      da2e18b9
  9. 11 May, 2009 3 commits
  10. 08 May, 2009 2 commits
  11. 05 May, 2009 2 commits
  12. 01 May, 2009 1 commit
  13. 09 May, 2009 3 commits
  14. 08 May, 2009 4 commits
  15. 07 May, 2009 4 commits
  16. 06 May, 2009 1 commit
  17. 05 May, 2009 1 commit
    • Ian Lynagh's avatar
      Simplify utils/pwd · 9000c679
      Ian Lynagh authored
      We only need the forwardslash mode now, so always use that mode and
      don't accept any arguments.
      9000c679
  18. 04 May, 2009 3 commits