1. 12 Jun, 2012 2 commits
  2. 11 Jun, 2012 3 commits
  3. 08 Jun, 2012 2 commits
  4. 07 Jun, 2012 1 commit
  5. 29 May, 2012 2 commits
  6. 28 May, 2012 1 commit
    • Ian Lynagh's avatar
      Add defaultLogActionHPrintDoc to DynFlags · a7b1d219
      Ian Lynagh authored
      We now use this function rather than Outputable.{printSDoc,printErrs}.
      
      Outputable is arguably a better home for the function, but putting it
      in DynFlags should dissuade people from using it inappropriately (in
      particular, nothing other than the default hooks should have stdout
      or stderr hardcoded).
      
      Not exporting it at all would also be an option, but exporting it with
      an ungainly name will make it slightly easier for people who want to
      send output to other Handles for some reason.
      a7b1d219
  7. 22 May, 2012 1 commit
  8. 15 May, 2012 3 commits
    • pcapriotti's avatar
      Simplify the behavior of package db flags. · ba409e30
      pcapriotti authored
      Previously, the `-no-user-package` and `-no-global-package` flags
      affected the "initial" stack only, while `user-package` and
      `global-packages` appended to the end of the stack.
      
      This commit changes the behavior of those flags, so that they are always
      applied to the stack as a whole.
      
      The effect of the GHC_PACKAGE_PATH environment variable has also been
      changed: terminating it with a separator now adds the default package
      dbs (user and global) instead of the initial stack.
      ba409e30
    • pcapriotti's avatar
      Rename package-conf flags to package-db. · ca2debb2
      pcapriotti authored
      Rename package database flags in both GHC and ghc-pkg so that they are
      consistent with Cabal nomenclature.
      
      Add a version check to the build system so that the correct set of
      package db flags are used when the bootstrapping GHC has version < 7.5.
      ca2debb2
    • pcapriotti's avatar
      Add flags to manipulate package db stack (#5977) · 6a831be4
      pcapriotti authored
      Introduce new flags to allow any package database stack to be set up.
      The `-no-user-package-conf` and `-no-global-package-conf` flags remove
      the corresponding package db from the initial stack, while
      `-user-package-conf` and `-global-package-conf` push it back on top of
      the stack.
      6a831be4
  9. 24 Apr, 2012 1 commit
  10. 20 Apr, 2012 1 commit
  11. 11 Apr, 2012 1 commit
  12. 04 Apr, 2012 2 commits
  13. 28 Mar, 2012 1 commit
  14. 24 Mar, 2012 1 commit
  15. 23 Mar, 2012 2 commits
  16. 01 Mar, 2012 1 commit
    • Simon Marlow's avatar
      GHCi: add :seti, for options that apply only at the prompt (#3217) · 2e55760b
      Simon Marlow authored
      GHCi now maintains two DynFlags: one that applies to whole modules
      loaded with :load, and one that applies to things typed at the prompt
      (expressions, statements, declarations, commands).
      
        The :set command modifies both DynFlags.  This is for backwards
        compatibility: users won't notice any difference.
      
        The :seti command applies only to the interactive DynFlags.
      
      Additionally, I made a few changes to ":set" (with no arguments):
      
        * Now it only prints out options that differ from the defaults,
          rather than the whole list.
      
        * There is a new variant, ":set -a" to print out all options (the
          old behaviour).
      
        * It also prints out language options.
      
      e.g.
      
      Prelude> :set
      options currently set: none.
      base language is: Haskell2010
      with the following modifiers:
        -XNoDatatypeContexts
        -XNondecreasingIndentation
      GHCi-specific dynamic flag settings:
      other dynamic, non-language, flag settings:
        -fimplicit-import-qualified
      warning settings:
      
      ":seti" (with no arguments) does the same as ":set", but for the
      interactive options.  It also has the "-a" option.
      
      The interactive DynFlags are kept in the InteractiveContext, and
      copied into the HscEnv at the appropriate points (all in HscMain).
      
      There are some new GHC API operations:
      
      -- | Set the 'DynFlags' used to evaluate interactive expressions.
      setInteractiveDynFlags :: GhcMonad m => DynFlags -> m ()
      
      -- | Get the 'DynFlags' used to evaluate interactive expressions.
      getInteractiveDynFlags :: GhcMonad m => m DynFlags
      
      -- | Sets the program 'DynFlags'.
      setProgramDynFlags :: GhcMonad m => DynFlags -> m [PackageId]
      
      -- | Returns the program 'DynFlags'.
      getProgramDynFlags :: GhcMonad m => m DynFlags
      
      Note I have not completed the whole of the plan outlined in #3217 yet:
      when in the context of a loaded module we don't take the interactive
      DynFlags from that module.  That needs some more refactoring and
      thinking about, because we'll need to save and restore the original
      interactive DynFlags.
      
      This solves the immediate problem that people are having with the new
      flag checking in 7.4.1, because now it is possible to set language
      options in ~/.ghci that do not affect loaded modules and thereby cause
      recompilation.
      2e55760b
  17. 24 Feb, 2012 1 commit
  18. 16 Feb, 2012 1 commit
  19. 14 Feb, 2012 1 commit
  20. 09 Feb, 2012 1 commit
  21. 19 Jan, 2012 1 commit
    • Ian Lynagh's avatar
      Fix validate · 8bdcc5cf
      Ian Lynagh authored
      This patch defines a flag -fno-warn-pointless-pragmas, and uses it to
      disable some warnings in the containers package.
      
      Along the way, also made a ContainsDynFlags class, and added a
      HasDynFlags instance for IOEnv (and thus TcRnIf and DsM).
      8bdcc5cf
  22. 17 Jan, 2012 1 commit
  23. 16 Jan, 2012 1 commit
  24. 13 Jan, 2012 2 commits
  25. 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
  26. 20 Dec, 2011 1 commit
  27. 19 Dec, 2011 1 commit
    • Ian Lynagh's avatar
      Add a class HasDynFlags(getDynFlags) · 06c6d970
      Ian Lynagh authored
      We no longer have many separate, clashing getDynFlags functions
      
      I've given each GhcMonad its own HasDynFlags instance, rather than
      using UndecidableInstances to make a GhcMonad m => HasDynFlags m
      instance.
      06c6d970
  28. 12 Dec, 2011 1 commit
  29. 07 Dec, 2011 1 commit
  30. 02 Dec, 2011 1 commit
    • Simon Marlow's avatar
      More changes aimed at improving call stacks. · 1469f1eb
      Simon Marlow authored
        - Attach a SrcSpan to every CostCentre.  This had the side effect
          that CostCentres that used to be merged because they had the same
          name are now considered distinct; so I had to add a Unique to
          CostCentre to give them distinct object-code symbols.
      
        - New flag: -fprof-auto-calls.  This flag adds an automatic SCC to
          every call site (application, to be precise).  This is typically
          more useful for call stacks than annotating whole functions.
      
      Various tidy-ups at the same time: removed unused NoCostCentre
      constructor, and refactored a bit in Coverage.lhs.
      
      The call stack we get from traceStack now looks like this:
      
      Stack trace:
        Main.CAF (<entire-module>)
        Main.main.xs (callstack002.hs:18:12-24)
        Main.map (callstack002.hs:13:12-16)
        Main.map.go (callstack002.hs:15:21-34)
        Main.map.go (callstack002.hs:15:21-23)
        Main.f (callstack002.hs:10:7-43)
      1469f1eb