1. 03 Oct, 2012 1 commit
  2. 17 Sep, 2012 1 commit
  3. 16 Sep, 2012 1 commit
  4. 03 Sep, 2012 1 commit
  5. 28 Aug, 2012 2 commits
  6. 02 Jul, 2012 1 commit
  7. 12 Jun, 2012 1 commit
  8. 11 Jun, 2012 1 commit
    • Ian Lynagh's avatar
      Pass DynFlags to the LogAction · 5716a2f8
      Ian Lynagh authored
      A side-effect is that we can no longer use the LogAction in
      defaultErrorHandler, as we don't have DynFlags at that point.
      But all that defaultErrorHandler did is to print Strings as
      SevFatal, so now it takes a 'FatalMessager' instead.
      5716a2f8
  9. 04 Jun, 2012 1 commit
  10. 29 May, 2012 2 commits
  11. 20 Mar, 2012 1 commit
  12. 12 Jan, 2012 1 commit
    • Simon Peyton Jones's avatar
      Implememt -fdefer-type-errors (Trac #5624) · 5508ada4
      Simon Peyton Jones authored
      This patch implements the idea of deferring (most) type errors to
      runtime, instead emitting only a warning at compile time.  The
      basic idea is very simple:
      
       * The on-the-fly unifier in TcUnify never fails; instead if it
         gets stuck it emits a constraint.
      
       * The constraint solver tries to solve the constraints (and is
         entirely unchanged, hooray).
      
       * The remaining, unsolved constraints (if any) are passed to
         TcErrors.reportUnsolved.  With -fdefer-type-errors, instead of
         emitting an error message, TcErrors emits a warning, AND emits
         a binding for the constraint witness, binding it
         to (error "the error message"), via the new form of evidence
         TcEvidence.EvDelayedError.  So, when the program is run,
         when (and only when) that witness is needed, the program will
         crash with the exact same error message that would have been
         given at compile time.
      
      Simple really.  But, needless to say, the exercise forced me
      into some major refactoring.
      
       * TcErrors is almost entirely rewritten
      
       * EvVarX and WantedEvVar have gone away entirely
      
       * ErrUtils is changed a bit:
           * New Severity field in ErrMsg
           * Renamed the type Message to MsgDoc (this change
             touches a lot of files trivially)
      
       * One minor change is that in the constraint solver we try
         NOT to combine insoluble constraints, like Int~Bool, else
         all such type errors get combined together and result in
         only one error message!
      
       * I moved some definitions from TcSMonad to TcRnTypes,
         where they seem to belong more
      5508ada4
  13. 04 Nov, 2011 1 commit
  14. 18 Oct, 2011 1 commit
  15. 21 Sep, 2011 1 commit
    • Simon Marlow's avatar
      Add support for all top-level declarations to GHCi · 3db75724
      Simon Marlow authored
        This is work mostly done by Daniel Winograd-Cort during his
        internship at MSR Cambridge, with some further refactoring by me.
      
      This commit adds support to GHCi for most top-level declarations that
      can be used in Haskell source files.  Class, data, newtype, type,
      instance are all supported, as are Type Family-related declarations.
      
      The current set of declarations are shown by :show bindings.  As with
      variable bindings, entities bound by newer declarations shadow earlier
      ones.
      
      Tests are in testsuite/tests/ghci/scripts/ghci039--ghci054.
      Documentation to follow.
      3db75724
  16. 03 Aug, 2011 2 commits
    • Simon Marlow's avatar
      Followup to #5289 changes: fix searching for dynamic libraries and use · d146fdbb
      Simon Marlow authored
      of the RTS addDLL() API on Windows.  When searching for DLLs we should
      include the .dll extension, but addDLL() takes a filename without the
      extension.
      d146fdbb
    • Simon Marlow's avatar
      Fix #5289 (loading libstdc++.so in GHCi), and also fix some other · 9babbc8d
      Simon Marlow authored
      linking scenarios.  We weren't searching for .a archives to satisfy
      -lfoo options on the GHCi command line, for example.
      
      I've tidied up the code in this module so that dealing with -l options
      on the command line is consistent with the handling of extra-libraries
      for packages.
      
      While I was here I moved some stuff out of Linker.hs that didn't seem
      to belong here: dataConInfoPtrToName (now in new module DebuggerUtils)
      and lessUnsafeCoerce (now in DynamicLoading, next to its only use)
      9babbc8d
  17. 29 Jul, 2011 1 commit
    • batterseapower's avatar
      Add CoreMonad.reinitializeGlobals so plugins can work around linker issues · 0e765db4
      batterseapower authored
      When a plugin is loaded, it currently gets linked against a *newly loaded* copy
      of the GHC package. This would not be a problem, except that the new copy has its
      own mutable state that is not shared with that state that has already been initialized by
      the original GHC package.
      
      This leads to loaded plugins calling GHC code which pokes the static flags,
      and then dying with a panic because the static flags *it* sees are uninitialized.
      
      There are two possible solutions:
        1. Export the symbols from the GHC executable from the GHC library and link
           against this existing copy rather than a new copy of the GHC library
        2. Carefully ensure that the global state in the two copies of the GHC
           library matches
      
      I tried 1. and it *almost* works (and speeds up plugin load times!) except
      on Windows. On Windows the GHC library tends to export more than 65536 symbols
      (see #5292) which overflows the limit of what we can export from the EXE and
      causes breakage.
      
      (Note that if the GHC exeecutable was dynamically linked this wouldn't be a problem,
      because we could share the GHC library it links to.)
      
      We are going to try 2. instead. Unfortunately, this means that every plugin
      will have to say `reinitializeGlobals` before it does anything, but never mind.
      
      I've threaded the cr_globals through CoreM rather than giving them as an
      argument to the plugin function so that we can turn this function into
      (return ()) without breaking any plugins when we eventually get 1. working.
      0e765db4
  18. 12 Jul, 2011 1 commit
  19. 18 Jun, 2011 1 commit
    • dterei's avatar
      SafeHaskell: Transitively check safety when compiling a module. · 77d85a4a
      dterei authored
      While we previously checked the safety of safe imported modules we
      didn't do this check transitively. This can be a problem when we depend
      on a trustworthy module in a package that is no longer trusted, so we
      should fail compilation. We already stored in an interface file the
      transitive list of packages a module depends on. Now we extend that list
      to include a flag saying if we depend on that package being trusted as
      well.
      77d85a4a
  20. 16 Jun, 2011 1 commit
    • Simon Peyton Jones's avatar
      Add dynamically-linked plugins (see Trac #3843) · 592def09
      Simon Peyton Jones authored
      This patch was originally developed by Max Bolingbroke, and worked on
      further by Austin Seipp.  It allows you to write a Core-to-Core pass
      and have it dynamically linked into an otherwise-unmodified GHC, and
      run at a place you specify in the Core optimisation pipeline.
      
      Main components:
        - CoreMonad: new types Plugin, PluginPass
                     plus a new constructor CoreDoPluginPass in CoreToDo
      
        - SimplCore: stuff to dynamically load any plugins, splice
          them into the core-to-core pipeline, and invoke them
      
        - Move "getCoreToDo :: DynFlags -> [CoreToDo]"
            which constructs the main core-to-core pipeline
            from CoreMonad to SimplCore
          SimplCore is the driver for the optimisation pipeline, and it
          makes more sense to have the pipeline construction in the driver
          not in the infrastructure module.
      
        - New module DynamicLoading: invoked by SimplCore to load any plugins
          Some consequential changes in Linker.
      
        - New module GhcPlugins: this should be imported by plugin modules; it
          it not used by GHC itself.
      592def09
  21. 03 Apr, 2011 1 commit
  22. 13 Dec, 2010 1 commit
  23. 27 Nov, 2010 1 commit
  24. 06 Oct, 2010 1 commit
  25. 20 Sep, 2010 2 commits
  26. 14 Sep, 2010 1 commit
    • Ian Lynagh's avatar
      Remove (most of) the FiniteMap wrapper · e95ee1f7
      Ian Lynagh authored
      We still have
          insertList, insertListWith, deleteList
      which aren't in Data.Map, and
          foldRightWithKey
      which works around the fold(r)WithKey addition and deprecation.
      e95ee1f7
  27. 13 Sep, 2010 1 commit
  28. 27 Jul, 2010 1 commit
  29. 09 Jul, 2010 1 commit
  30. 20 Mar, 2010 1 commit
  31. 03 Jan, 2010 1 commit
  32. 04 Nov, 2009 1 commit
    • Simon Marlow's avatar
      #3604: treat TH with -dynamic in the same way as -prof · 86b891f0
      Simon Marlow authored
      That is, you have to build the library/program without -dynamic first,
      to get plain object files, and then build it again with -dynamic.
      
      I still need to check whether any changes to Cabal are required to
      make this work.
      86b891f0
  33. 08 Sep, 2009 1 commit
  34. 24 Aug, 2009 1 commit
  35. 20 Aug, 2009 2 commits