1. 19 May, 2015 2 commits
    • Austin Seipp's avatar
      Revert "compiler: make sure we reject -O + HscInterpreted" (again) · edb8dc5c
      Austin Seipp authored
      Apparently my machine likes this commit, but Harbormaster does not?
      
      This reverts commit b199536b.
      edb8dc5c
    • Austin Seipp's avatar
      compiler: make sure we reject -O + HscInterpreted · b199536b
      Austin Seipp authored
      When using GHCi, we explicitly reject optimization, because the
      compilers optimization passes can introduce unboxed tuples, which the
      interpreter is not able to handle. But this goes the other way too: using
      GHCi on optimized code may cause the optimizer to float out breakpoints
      that the interpreter introduces. This manifests itself in weird ways,
      particularly if you as an API client use custom DynFlags to introduce
      optimization in combination with HscInterpreted.
      
      It turns out we weren't checking for consistent DynFlag settings when
      doing `setSessionDynFlags`, as #10052 showed. While the main driver
      handled it in `DynFlags` via `parseDynamicFlags`, we didn't check this
      elsewhere.
      
      This does a little refactoring to split out some of the common code, and
      immunizes the various `DynFlags` utilities in the `GHC` module from this
      particular bug. We should probably be checking other general invariants
      too.
      
      This fixes #10052, and adds some notes about the behavior in `GHC` and
      `FloatOut`
      
      As a bonus, expose `warningMsg` from `ErrUtils` as a helper since it
      didn't exist (somehow).
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      
      Reviewed By: edsko
      
      Differential Revision: https://phabricator.haskell.org/D727
      
      GHC Trac Issues: #10052
      b199536b
  2. 13 May, 2015 1 commit
    • Austin Seipp's avatar
      Revert D727 · 8764a7e8
      Austin Seipp authored
      This caused print007 to fail, so I guess I botched this more than I
      thought. This is a combination of reverting:
      
        "Fix build breakage from 9736c042", commit f35d621d.
        "compiler: make sure we reject -O + HscInterpreted", commit 9736c042.
      8764a7e8
  3. 11 May, 2015 1 commit
    • Austin Seipp's avatar
      compiler: make sure we reject -O + HscInterpreted · 9736c042
      Austin Seipp authored
      When using GHCi, we explicitly reject optimization, because the
      compilers optimization passes can introduce unboxed tuples, which the
      interpreter is not able to handle. But this goes the other way too: using
      GHCi on optimized code may cause the optimizer to float out breakpoints
      that the interpreter introduces. This manifests itself in weird ways,
      particularly if you as an API client use custom DynFlags to introduce
      optimization in combination with HscInterpreted.
      
      It turns out we weren't checking for consistent DynFlag settings when
      doing `setSessionDynFlags`, as #10052 showed. While the main driver
      handled it in `DynFlags` via `parseDynamicFlags`, we didn't check this
      elsewhere.
      
      This does a little refactoring to split out some of the common code, and
      immunizes the various `DynFlags` utilities in the `GHC` module from this
      particular bug. We should probably be checking other general invariants
      too.
      
      This fixes #10052, and adds some notes about the behavior in `GHC` and
      `FloatOut`
      
      As a bonus, expose `warningMsg` from `ErrUtils` as a helper since it
      didn't exist (somehow).
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      
      Reviewed By: edsko
      
      Differential Revision: https://phabricator.haskell.org/D727
      
      GHC Trac Issues: #10052
      9736c042
  4. 14 Apr, 2015 1 commit
  5. 29 Mar, 2015 1 commit
  6. 13 Jan, 2015 1 commit
    • GregWeber's avatar
      add -th-file which generates a th.hs file · 07ace5c2
      GregWeber authored
      Summary:
      see Trac #8624
      
      similar functionality is now available
      with -ddump-to-file -ddump-splices
      
      However, users are already accustomed to -ddump-splices
      having a particular format, and this format is not completely valid code
      The goal of -th-file is to dump valid Haskell code
      
      Additionally, the convention of -ddump-to-file is to name the file after
      the flag, so the file is .dump-splices
      Given that the goal of the new flag is to generate valid Haskell,
      The extension should be .hs
      
      Additionally, -ddump-to-file effects all other dump flags
      
      Test Plan:
      look at the output of using the -th-file flag
      and compare it to the output of using -ddump-to-file and -ddump-splices
      I want to add test cases, but just need some pointers on getting started there
      
      Reviewers: thomie, goldfire, simonpj, austin
      
      Reviewed By: simonpj, austin
      
      Subscribers: thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D518
      
      GHC Trac Issues: #8624
      07ace5c2
  7. 09 Jan, 2015 1 commit
    • Simon Peyton Jones's avatar
      A little tidying up in ErrUtils · 4425ab99
      Simon Peyton Jones authored
      This module is a disorganised mess.
      
      For example, there is literally *no* documentation of what the *seven*
      different forms of 'Severity' are intended to connote.
      
      Anyway this patch makes a tiny step by not exporting unused functions
      pprMsgBag and isWarning, and a little bit of internal refactoring
      4425ab99
  8. 03 Dec, 2014 1 commit
  9. 28 Nov, 2014 2 commits
  10. 19 Nov, 2014 1 commit
    • GregWeber's avatar
      make TcRnMonad.lhs respect -ddump-to-file · 33c029fa
      GregWeber authored
      Summary: allows things such as: -ddump-to-file -ddump-splices
      
      Test Plan:
      compile with flags -ddump-to-file -ddump-splices
      verify that it does output an extra file
      
      Try out other flags.
      I noticed that with -ddump-tc there is some output going to file and some to stdout.
      
      Reviewers: hvr, austin
      
      Reviewed By: austin
      
      Subscribers: simonpj, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D460
      
      GHC Trac Issues: #9126
      33c029fa
  11. 04 Nov, 2014 1 commit
  12. 26 Sep, 2014 1 commit
  13. 09 Sep, 2014 1 commit
    • Austin Seipp's avatar
      Make Applicative a superclass of Monad · d94de872
      Austin Seipp authored
      Summary:
      This includes pretty much all the changes needed to make `Applicative`
      a superclass of `Monad` finally. There's mostly reshuffling in the
      interests of avoid orphans and boot files, but luckily we can resolve
      all of them, pretty much. The only catch was that
      Alternative/MonadPlus also had to go into Prelude to avoid this.
      
      As a result, we must update the hsc2hs and haddock submodules.
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      
      Test Plan: Build things, they might not explode horribly.
      
      Reviewers: hvr, simonmar
      
      Subscribers: simonmar
      
      Differential Revision: https://phabricator.haskell.org/D13
      d94de872
  14. 25 Jul, 2014 1 commit
    • Simon Peyton Jones's avatar
      Refactor FFI error messages · 92587bfe
      Simon Peyton Jones authored
      This patch was provoked by Trac #5610, which I finally got a moment to look at.
      
      In the end I added a new data type ErrUtils.Validity,
      
        data Validity
          = IsValid            -- Everything is fine
          | NotValid MsgDoc    -- A problem, and some indication of why
      
      with some suitable combinators, and used it where appropriate (which touches
      quite a few modules).  The main payoff is that error messages improve for
      FFI type validation.
      92587bfe
  15. 15 May, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Add LANGUAGE pragmas to compiler/ source files · 23892440
      Herbert Valerio Riedel authored
      In some cases, the layout of the LANGUAGE/OPTIONS_GHC lines has been
      reorganized, while following the convention, to
      
      - place `{-# LANGUAGE #-}` pragmas at the top of the source file, before
        any `{-# OPTIONS_GHC #-}`-lines.
      
      - Moreover, if the list of language extensions fit into a single
        `{-# LANGUAGE ... -#}`-line (shorter than 80 characters), keep it on one
        line. Otherwise split into `{-# LANGUAGE ... -#}`-lines for each
        individual language extension. In both cases, try to keep the
        enumeration alphabetically ordered.
        (The latter layout is preferable as it's more diff-friendly)
      
      While at it, this also replaces obsolete `{-# OPTIONS ... #-}` pragma
      occurences by `{-# OPTIONS_GHC ... #-}` pragmas.
      23892440
  16. 26 Oct, 2013 1 commit
  17. 23 Jun, 2013 1 commit
  18. 30 Jan, 2013 1 commit
  19. 26 Nov, 2012 1 commit
  20. 18 Oct, 2012 1 commit
    • ian@well-typed.com's avatar
      Refactor the way dump flags are handled · d4a19643
      ian@well-typed.com authored
      We were being inconsistent about how we tested whether dump flags
      were enabled; in particular, sometimes we also checked the verbosity,
      and sometimes we didn't.
      
      This lead to oddities such as "ghc -v4" printing an "Asm code" section
      which didn't contain any code, and "-v4" enabled some parts of
      "-ddump-deriv" but not others.
      
      Now all the tests use dopt, which also takes the verbosity into account
      as appropriate.
      d4a19643
  21. 17 Oct, 2012 1 commit
  22. 16 Oct, 2012 2 commits
  23. 15 Oct, 2012 1 commit
  24. 08 Oct, 2012 1 commit
  25. 18 Jul, 2012 2 commits
  26. 22 Jun, 2012 1 commit
    • Ian Lynagh's avatar
      Remove some uses of sortLe · 0043f07a
      Ian Lynagh authored
      Technically the behaviour of sortWith has changed, as it used
          x `le` y = get_key x < get_key y
      (note "<" rather than "<="), but I assume that that was just a mistake.
      0043f07a
  27. 14 Jun, 2012 1 commit
  28. 12 Jun, 2012 4 commits
  29. 11 Jun, 2012 5 commits