1. 02 Mar, 2015 3 commits
  2. 23 Feb, 2015 6 commits
    • Oleg Grenrus's avatar
      driver: split -fwarn-unused-binds into 3 flags (fixes #17) · aead0190
      Oleg Grenrus authored
      Summary: New flags:
      
       -fwarn-unused-top-binds
       -fwarn-unused-local-binds
       -fwarn-unused-pattern-binds
      
      Test Plan: `tests/rename/should_compile/T17` tests
      
      Correct other tests
      
      Reviewers: austin, rwbarton
      
      Reviewed By: austin, rwbarton
      
      Subscribers: rwbarton, carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D591
      
      GHC Trac Issues: #17
      aead0190
    • Austin Seipp's avatar
      testsuite: update .gitignore · d1d02e80
      Austin Seipp authored
      
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      d1d02e80
    • thomie's avatar
      Show '#' on unboxed literals · 47175e06
      thomie authored
      Test Plan: deriving/should_run/T10104
      
      Reviewers: austin, jstolarek
      
      Reviewed By: austin, jstolarek
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D672
      
      GHC Trac Issues: #10104
      47175e06
    • thomie's avatar
      Declare some Makefile targets to be PHONY · a0ef626e
      thomie authored
      Summary:
      Given:
        a Makefile with a non-PHONY target called `target`
      If:
        after running `make target`, a file exists with the same name as `target`
        (it was either already there, or it was created by running `make target`)
      And:
        `target` has no dependencies, such as `clean`, that modify or delete that
        file
      Then:
        subsequent invocations of `make target` will not have any effect.
      
      Solution: make `target` PHONY.
      
      BAD:
        ```
        foo:
                ...
                ./foo
        ```
      
      BETTER:
        ```
        foo:
                ...
                ./foo
        .PHONY: foo
        ```
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D670
      a0ef626e
    • thomie's avatar
      Always ignore user-package-db when running tests · 30dc59e8
      thomie authored
      Summary:
      The user package database was already ignored for systems that
      `have_subprocess`.
      
      To [wiki:Debugging/InstallingPackagesInplace install] a package inplace:
      `cabal install
        --with-compiler=<inplace-ghc>
        --with-package-db=<inplace-package-db>`
        <package>
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D668
      30dc59e8
    • thomie's avatar
      Error out on `Main` without `main` in GHCi (#7765) · 0fa20726
      thomie authored
      Summary:
      GHC does 2 validation checks for module `Main`:
      * does `main` exist
      * is `main` exported (#414)
      
      The second check is done in ghc as well as in ghci (and runghc and ghc -e).
      The first check however is currently not done in ghci, to prevent "'main' is
      not in scope" errors when loading simple scripts. See commit d28ba8c8 for
      more information.
      
      This commit tightens the special case for ghci. When the file does not contain
      a main function, but does contain an explicit module header (i.e. "module Main
      where"), then /do/ raise an error in ghci (and runghc and ghc -e) as well
      
      Test Plan:
      module/T7765: a module Main with an explicit module header but without a
      main function should be an error for all Ways.
      
      Additionaly: delete test module/mod174. It was added in commit 5a54c38e, but it
      is a duplicate of module/T414.
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D649
      
      GHC Trac Issues: #7765
      0fa20726
  3. 20 Feb, 2015 2 commits
  4. 19 Feb, 2015 2 commits
    • kgardas's avatar
      fix T7600 run on bigendian platform · 3f30912f
      kgardas authored
      3f30912f
    • thomasw's avatar
      Fix #10045 · e9d72cef
      thomasw authored
      Summary:
      SPJ's solution is to only bring the `TcId` (which includes the type) of a
      binder into scope when it had a non-partial type signature.
      
      Take care of this by only storing the `TcId` in `TcSigInfo` of non-partial
      type signatures, hence the change to `sig_poly_id :: Maybe TcId`. Only in case
      of a `Just` will we bring the `TcId` in scope. We still need to know the name
      of the binder, even when it has a partial type signature, so add a `sig_name
      :: Name` field. The field `sig_partial :: Bool` is no longer necessary, so
      reimplement `isPartialSig` in terms of `sig_poly_id`.
      
      Note that the new test case fails, but not because of a panic, but because the
      `Num a` constraint is missing. Adding an extra-constraints wildcard to
      `copy`'s signature would fix it.
      
      Test Plan: validate
      
      Reviewers: simonpj, austin
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D646
      
      GHC Trac Issues: #10045
      e9d72cef
  5. 17 Feb, 2015 1 commit
    • thomie's avatar
      Don't truncate traceEvents to 512 bytes (#8309) · a82364c9
      thomie authored
      Summary:
      Don't call postLogMsg to post a user msg, because it truncates messages to
      512 bytes.
      
      Rename traceCap_stderr and trace_stderr to vtraceCap_stderr and trace_stderr,
      to signal that they take a va_list (similar to vdebugBelch vs debugBelch).
      
      See #3874 for the original reason behind traceFormatUserMsg.
      
      See the commit msg in #9395 (d360d440) for a discussion about using
      null-terminated strings vs strings with an explicit length.
      
      Test Plan:
      Run `cabal install ghc-events` and inspect the result of `ghc-events show` on
      an eventlog file created with `ghc -eventlog Test.hs` and `./Test +RTS -l`,
      where Test.hs contains:
      
      ```
      import Debug.Trace
      main = traceEvent (replicate 510 'a' ++ "bcd") $ return ()
      ```
      
      Depends on D655.
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D656
      
      GHC Trac Issues: #8309
      a82364c9
  6. 15 Feb, 2015 1 commit
  7. 13 Feb, 2015 1 commit
    • Simon Peyton Jones's avatar
      Refactor decideQuantification · b96db75c
      Simon Peyton Jones authored
      Richard was interrogating me about decideQuantification yesterday.
      I got a bit stuck on the promote_tvs part. This refactoring
      
       * simplifes the API of decideQuantification
      
       * move mkMinimalBySCs into decideQuantification (a better place for it)
      
       * moves promotion out of decideQuantification (where it didn't really
         fit), and comments much more fully what is going on with the promtion stuff
      
       * comments decideQuantification more fully
      
       * coments the EqPred case of quantifyPred more fully
      
      It turned out that the theta returned by decideQuantification,
      and hence by simplifyInfer, is now fully zonked, so I could remove
      a zonking in TcBinds.
      b96db75c
  8. 11 Feb, 2015 4 commits
  9. 10 Feb, 2015 3 commits
    • Simon Peyton Jones's avatar
      1d982ba1
    • Simon Peyton Jones's avatar
      Refactor the handling of quasi-quotes · f46360ed
      Simon Peyton Jones authored
      As Trac #10047 points out, a quasi-quotation [n|...blah...|] is supposed
      to behave exactly like $(n "...blah...").  But it doesn't!  This was outright
      wrong: quasiquotes were being run even inside brackets.
      
      Now that TH supports both typed and untyped splices, a quasi-quote is properly
      regarded as a particular syntax for an untyped splice. But apart from that
      they should be treated the same.  So this patch refactors the handling of
      quasiquotes to do just that.
      
      The changes touch quite a lot of files, but mostly in a routine way.
      The biggest changes by far are in RnSplice, and more minor changes in
      TcSplice.  These are the places where there was real work to be done.
      Everything else is routine knock-on changes.
      
      * No more QuasiQuote forms in declarations, expressions, types, etc.
        So we get rid of these data constructors
          * HsBinds.QuasiQuoteD
          * HsExpr.HsSpliceE
          * HsPat.QuasiQuotePat
          * HsType.HsQuasiQuoteTy
      
      * We get rid of the HsQuasiQuote type altogether
      
      * Instead, we augment the HsExpr.HsSplice type to have three
        consructors, for the three types of splice:
          * HsTypedSplice
          * HsUntypedSplice
          * HsQuasiQuote
        There are some related changes in the data types in HsExpr near HsSplice.
        Specifically: PendingRnSplice, PendingTcSplice, UntypedSpliceFlavour.
      
      * In Hooks, we combine rnQuasiQuoteHook and rnRnSpliceHook into one.
        A smaller, clearer interface.
      
      * We have to update the Haddock submodule, to accommodate the hsSyn changes
      f46360ed
    • Rufflewind's avatar
      Don't overwrite input file by default · 78833ca6
      Rufflewind authored
      Summary:
      If the default filename of the output executable coincides with that of main
      source file, throw an error instead of silently clobbering the input file.
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D642
      
      GHC Trac Issues: #9930
      78833ca6
  10. 06 Feb, 2015 5 commits
  11. 05 Feb, 2015 2 commits
  12. 04 Feb, 2015 1 commit
    • Simon Marlow's avatar
      Fix a profiling bug · daed18c3
      Simon Marlow authored
      Summary:
      We were erroneously discarding SCCs on function-typed variables.
      These can affect the call stack, so we have to retain them.  The bug
      was introduced during the recent SourceNote refactoring.
      
      This is an alternative to the fix proposed in D616.  I also added the
      scc005 test from that diff, which works with this change.
      
      While I was here, I also fixed up the other profiling tests, marking a
      few as expect_broken_for(10037) where the opt/unopt output differs in
      non-fatal ways.
      
      Test Plan: profiling tests
      
      Reviewers: scpmw, ezyang, austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D636
      
      GHC Trac Issues: #10007
      daed18c3
  13. 02 Feb, 2015 1 commit
    • AndreasVoellmy's avatar
      Fix #10017 · 92c93544
      AndreasVoellmy authored
      Summary:
      In the threaded RTS, a signal is delivered from the RTS to Haskell
      user code by writing to file that one of the IO managers watches (via
      an instance of GHC.Event.Control.Control). When the IO manager
      receives the signal, it calls GHC.Conc.Signal.runHandlers to invoke
      Haskell signal handler. In the move from a single IO manager to one IO
      manager per capability, the behavior was (wrongly) extended so that a
      signal is delivered to every event manager (see #9423), each of which
      invoke Haskell signal handlers, leading to multiple invocations of
      Haskell signal handlers for a single signal. This change fixes this
      problem by having the RTS (in generic_handler()) notify only the
      Control instance used by the TimerManager, rather than all the
      per-capability IO managers.
      
      Reviewers: austin, hvr, simonmar, Mikolaj
      
      Reviewed By: simonmar, Mikolaj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D641
      92c93544
  14. 28 Jan, 2015 1 commit
  15. 27 Jan, 2015 1 commit
  16. 22 Jan, 2015 3 commits
  17. 20 Jan, 2015 3 commits