1. 01 Dec, 2015 1 commit
    • thomie's avatar
      Build system: Add stage specific SRC_HC_(WARNING_)OPTS · 14d0f7f1
      thomie authored
      * Add stage specific versions of SRC_HC_OPTS. These are currently only
        used for -Werror. The previous combination of GhcStage2HcOpts and
        GhcLibHcOpts didn't apply to utils/*.
      
      * Add stage specific versions of SRC_HC_WARNING_OPTS. These will later be
        used for new warning supression flags that should not be passed to the
        bootstrap compiler.
      
      * Move -Wall (and -Werror) related code back to mk/warnings.mk, where it
        was before 987d5427. Now all warning related code is nicely together.
        Include mk/warnings.mk after mk/custom-settings.mk to make this work.
      
      Reviewed By: bgamari, hvr
      
      Differential Revision: https://phabricator.haskell.org/D1536
      14d0f7f1
  2. 03 Nov, 2015 1 commit
    • thomie's avatar
      Build system: renable -Wall on validate (base) · 987d5427
      thomie authored
      Problem: 'SRC_HC_OPTS += -Wall' in 'mk/warnings.mk' was getting
      overwritten by 'SRC_HC_OPTS = ...' in 'mk/flavours/*.mk'.
      
      It didn't affect the compiler or most other libraries, because most
      .cabal files define 'ghc-options: -Wall'.
      
      Bug introduced in commit
      2c24fd70, when moving validate settings
      from 'mk/validate-settings.mk' to 'mk/flavours/validate.mk'.
      
      Reviewed By: austin
      
      Differential Revision: https://phabricator.haskell.org/D1425
      987d5427
  3. 03 Aug, 2015 1 commit
  4. 30 Jul, 2015 1 commit
    • Simon Peyton Jones's avatar
      The parallel package has warnings · 918dcf83
      Simon Peyton Jones authored
      This patch suppresses them until they are fixed
      
      libraries/parallel/Control/Parallel/Strategies.hs:513:2: warning:
          Rule "parList/rseq" may never fire
            because ‘rseq’ might inline first
          Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘rseq’
      
      libraries/parallel/Control/Parallel/Strategies.hs:582:1: warning:
          Rule "evalBuffer/rseq" may never fire
            because ‘rseq’ might inline first
          Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘rseq’
      
      libraries/parallel/Control/Parallel/Strategies.hs:583:1: warning:
          Rule "parBuffer/rseq" may never fire
            because ‘rseq’ might inline first
          Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘rseq’
      918dcf83
  5. 28 Jul, 2015 1 commit
    • Simon Peyton Jones's avatar
      Fallout from more assiduous RULE warnings · a1dd7dd6
      Simon Peyton Jones authored
      GHC now warns if rules compete, so that it's not predicatable
      which will work and which will not. E.g.
      
      {-# RULES
        f (g x) = ...
        g True  = ...
        #-}
      
      If we had (f (g True)) it's not clear which rule would fire.
      
      This showed up fraility in the libraries.
      
      * Suppress warnigns in Control.Arrow, Control.Category for class
        methods. At the moment we simply don't have a good way to write a
        RULE with a class method in the LHS.  See Trac #1595.  Arrow and
        Category attempt to do so; I have silenced the complaints with
        -fno-warn-inline-rule-shadowing, but it's not a great solution.
      
      * Adjust the NOINLINE pragma on 'GHC.Base.map' to account for the
        map/coerce rule
      
      * Adjust the rewrite rules in Enum, especially for the "literal 1"
        case.  See Note [Enum Integer rules for literal 1].
      
      * Suppress warnings for 'bytestring' e.g.
         libraries/bytestring/Data/ByteString.hs:895:1: warning:
            Rule "ByteString specialise break (x==)" may never fire
              because rule "Class op ==" for ‘==’ might fire first
            Probable fix: add phase [n] or [~n] to the competing rule
      a1dd7dd6
  6. 12 May, 2015 1 commit
  7. 11 May, 2015 1 commit
    • Edward Z. Yang's avatar
      Support stage 1 Template Haskell (non-quasi) quotes, fixes #10382. · f16ddcee
      Edward Z. Yang authored
      Summary:
      This commit adds stage 1 support for Template Haskell
      quoting, e.g. [| ... expr ... |], which is useful
      for authors of quasiquoter libraries that do not actually
      need splices.  The TemplateHaskell extension now does not
      unconditionally fail; it only fails if the renamer encounters
      a splice that it can't run.
      
      In order to make sure the referenced data structures
      are consistent, template-haskell is now a boot library.
      There are some minor BC changes to template-haskell to make it boot
      on GHC 7.8.
      
      Note for reviewer: big diff changes are simply code
      being moved out of an ifdef; there was no other substantive
      change to that code.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonpj, austin, goldfire
      
      Subscribers: bgamari, thomie
      
      Differential Revision: https://phabricator.haskell.org/D876
      
      GHC Trac Issues: #10382
      f16ddcee
  8. 09 May, 2015 2 commits
    • Edward Z. Yang's avatar
      Revert stage 1 template-haskell. This is a combination of 5 commits. · 5c459eef
      Edward Z. Yang authored
      Revert "Quick fix: drop base bound on template-haskell."
      
      This reverts commit 3c70ae03.
      
      Revert "Always do polymorphic typed quote check, c.f. #10384"
      
      This reverts commit 9a43b2c1.
      
      Revert "RnSplice's staging test should be applied for quotes in stage1."
      
      This reverts commit eb0ed403.
      
      Revert "Split off quotes/ from th/ for tests that can be done on stage1 compiler."
      
      This reverts commit 21c72e7d.
      
      Revert "Support stage 1 Template Haskell (non-quasi) quotes, fixes #10382."
      
      This reverts commit 28257cae.
      5c459eef
    • Edward Z. Yang's avatar
      Support stage 1 Template Haskell (non-quasi) quotes, fixes #10382. · 28257cae
      Edward Z. Yang authored
      Summary:
      This commit adds stage 1 support for Template Haskell
      quoting, e.g. [| ... expr ... |], which is useful
      for authors of quasiquoter libraries that do not actually
      need splices.  The TemplateHaskell extension now does not
      unconditionally fail; it only fails if the renamer encounters
      a splice that it can't run.
      
      In order to make sure the referenced data structures
      are consistent, template-haskell is now a boot library.
      
      In the following patches, there are:
      
          - A few extra safety checks which should be enabled
            in stage1
          - Separation of the th/ testsuite into quotes/ which
            can be run on stage1
      
      Note for reviewer: big diff changes are simply code
      being moved out of an ifdef; there was no other substantive
      change to that code.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonpj, austin, goldfire
      
      Subscribers: bgamari, thomie
      
      Differential Revision: https://phabricator.haskell.org/D876
      
      GHC Trac Issues: #10382
      28257cae
  9. 02 Apr, 2015 1 commit
    • thomie's avatar
      Disable same warnings for normal builds as for validate (#10223) · 4c1e1c87
      thomie authored
      The default validate settings currently disable some warnings in the
      libraries. This patch moves those settings to a new file called
      `mk/warnings.mk`, and applies them also to normal builds.
      
      Through uncommenting a line in build.mk, developers can now build with
      -Werror.
      
      -Werror is not the default, because:
      * We can not guarantee that the build is warning free on platforms we
        don't run regularly run validate (as part of continuous integration
        systems), and we still want the build to go through on those
        platforms.
      * quoting rwbarton on irc > "I think -Werror by default has come up in
        the past and the argument was that it is too annoying when you are
        doing nontrivial development"
      
      Reviewed By: austin
      
      Differential Revision: https://phabricator.haskell.org/D785
      4c1e1c87
  10. 06 Jan, 2015 1 commit
  11. 28 Dec, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Update validate-settings.mk · 6c86635d
      Herbert Valerio Riedel authored
      This drops a couple of `-fno-warn-*` which seem to have become obsolete
      by now.
      
      Moreover, with the cleaned up settings `./validate` passes with GHC
      7.10.1 as bootstrap compiler.
      6c86635d
  12. 27 Dec, 2014 1 commit
  13. 09 Dec, 2014 1 commit
  14. 24 Nov, 2014 1 commit
  15. 17 Nov, 2014 1 commit
  16. 15 Nov, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Update to (unreleased) `deepseq-1.4.0.0` · 609cd28a
      Herbert Valerio Riedel authored
      This pulls in the new `Generic`-based `-XDefaultSignature`-based default
      implementation for `rnf`[1], and will be interesting to use in combination
      with the soon to be merged `-XDeriveAnyClass` extension.
      
      This requires updating several other submodules as well in order
      to relax the upper bound on `deepseq` and/or in a few cases to
      avoid relying on the default method implementation of `rnf`:
      
       - `Cabal`
       - `bytestring`
       - `containers`
       - `parallel`
       - `process`
       - `time`
      
       [1]: http://permalink.gmane.org/gmane.comp.lang.haskell.libraries/23031
      609cd28a
  17. 13 Nov, 2014 1 commit
  18. 30 Oct, 2014 1 commit
  19. 21 Oct, 2014 1 commit
    • mlen's avatar
      Enabled warn on tabs by default (fixes #9230) · 972ba121
      mlen authored
      Summary:
      This revision enables -fwarn-tabs by default and add a suppression
      flag, so that GHC compilation won't fail when some files contain tab
      characters.
      
      Test Plan: Additional test case, T9230, was added to cover that change.
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: simonmar, ezyang, carter, thomie, mlen
      
      Differential Revision: https://phabricator.haskell.org/D255
      
      GHC Trac Issues: #9230
      
      Conflicts:
      	testsuite/driver/testlib.py
      972ba121
  20. 21 Sep, 2014 1 commit
  21. 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
  22. 31 Aug, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Re-export Word from Prelude (re #9531) · 393b8202
      Herbert Valerio Riedel authored
      The original proposal text can be found at
      
        http://www.haskell.org/pipermail/libraries/2014-August/023491.html
      
      The proposal passed with a clear majority, and was additionally
      confirmed by the core libraries committee.
      
      *Compatibility Note*
      
      Only code that imports `Data.Word` for the sole purpose of using `Word`
      *and* requires to be `-Werror`-clean (due to `-fwarn-unused-imports`)
      is affected by this change.
      
      In order to write warning-free forward/backward compatible against `base`,
      a variant of the following CPP-based snippet can be used:
      
        -- Starting with base>4.7.0 or GHC>7.8 Prelude re-exports 'Word'
        -- The following is needed, if 'Word' is the *only* entity needed from Data.Word
        #ifdef MIN_VERSION_base
        # if !MIN_VERSION_base(4,7,1)
        import Data.Word (Word)
        # endif
        -- no cabal_macros.h -- fallback to __GLASGOW_HASKELL__
        #elif __GLASGOW_HASKELL__ < 709
        import Data.Word (Word)
        #endif
      
      This also updates the haddock submodule in order to avoid a compile warning
      393b8202
  23. 29 Aug, 2014 1 commit
  24. 20 Apr, 2014 1 commit
  25. 12 Sep, 2013 1 commit
    • Austin Seipp's avatar
      Implement the AMP warning (#8004) · 75a9664a
      Austin Seipp authored
      This patch implements a warning when definitions conflict with the
      Applicative-Monad Proposal (AMP), described in #8004. Namely, this will
      cause a warning iff:
      
          * You have an instance of Monad, but not Applicative
          * You have an instance of MonadPlus, but not Alternative
          * You locally defined a function named join, <*>, or pure.
      
      In GHC 7.10, these warnings will actually be enforced with superclass
      constraints through changes in base, so programs will fail to compile
      then.
      
      This warning is enabled by default. Unfortunately, not all of
      our upstream libraries have accepted the appropriate patches. So we
      temporarily fix ./validate by ignoring the AMP warning.
      
      Dan Rosén made an initial implementation of this change, and the
      remaining work was finished off by David Luposchainsky. I finally made
      some minor refactorings.
      Authored-by: danr's avatarDan Rosén <danr@chalmers.se>
      Authored-by: quchen's avatarDavid Luposchainsky <dluposchainsky@gmail.com>
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      75a9664a
  26. 04 Sep, 2013 2 commits
  27. 17 Mar, 2013 1 commit
  28. 15 Mar, 2013 1 commit
  29. 01 Mar, 2013 1 commit
  30. 03 Jan, 2013 1 commit
  31. 02 Jan, 2013 1 commit
  32. 23 Nov, 2012 2 commits
  33. 26 Oct, 2012 1 commit
  34. 25 Oct, 2012 1 commit
  35. 19 Oct, 2012 1 commit
  36. 03 Oct, 2012 1 commit
    • ian@well-typed.com's avatar
      Build the dynamic way by default on Linux/amd64 · 898cb090
      ian@well-typed.com authored
      This required various build system changes to get the build to go
      through.
      
      In the inplace shell wrappers, we set LD_LIBRARY_PATH to allow programs
      to find their libraries. In the future, we might change the inplace tree
      to be the same shape as an installed tree instead. However, this would
      mean changing the way we do installation, as currently we use cabal's
      installation methods to install the libraries, but that only works if
      the libraries are under libraries/foo/dist-install/build/..., rather
      than in inplace/lib/...
      898cb090
  37. 23 Sep, 2012 1 commit