1. 15 Apr, 2016 1 commit
  2. 10 Apr, 2016 1 commit
  3. 04 Apr, 2016 1 commit
    • Eric Seidel's avatar
      Don't infer CallStacks · 773e81ba
      Eric Seidel authored and Ben Gamari's avatar Ben Gamari committed
      We originally wanted CallStacks to be opt-in, but dealing with let
      binders complicated things, forcing us to infer CallStacks. It turns
      out that the inference is actually unnecessary though, we can let the
      wanted CallStacks bubble up to the outer context by refusing to
      quantify over them. Eventually they'll be solved from a given CallStack
      or defaulted to the empty CallStack if they reach the top.
      
      So this patch prevents GHC from quantifying over CallStacks, getting us
      back to the original plan. There's a small ugliness to do with
      PartialTypeSignatures, if the partial theta contains a CallStack
      constraint, we *do* want to quantify over the CallStack; the user asked
      us to!
      
      Note that this means that
      
        foo :: _ => CallStack
        foo = getCallStack callStack
      
      will be an *empty* CallStack, since we won't infer a CallStack for the
      hole in the theta. I think this is the right move though, since we want
      CallStacks to be opt-in. One can always write
      
        foo :: (HasCallStack, _) => CallStack
        foo = getCallStack callStack
      
      to get the CallStack and still have GHC infer the rest of the theta.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, simonpj, austin, hvr, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: bitemyapp, thomie
      
      Projects: #ghc
      
      Differential Revision: https://phabricator.haskell.org/D1912
      
      GHC Trac Issues: #11573
      
      (cherry picked from commit 7407a66d)
      773e81ba
  4. 30 Mar, 2016 1 commit
    • Ben Gamari's avatar
      Defer inlining of Ord methods · 007bb347
      Ben Gamari authored
      This performs the same refactoring performed in D1980 for Eq on Ord,
      rewriting the class operations in terms of monomorphic helpers than can
      be reliably matched in rewrite rules.
      
      (cherry picked from commit c0e3e63e)
      007bb347
  5. 25 Mar, 2016 1 commit
  6. 24 Mar, 2016 1 commit
    • Ben Gamari's avatar
      Defer inlining of Eq for primitive types · ed3398d1
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      Summary:
      This is one solution to #11688, wherein (==) was inlined to soon
      defeating a rewrite rule provided by bytestring. Since the RHSs of Eq's
      methods are simple, there is little to be gained and much to be lost by
      inlining them early.
      
      For instance, the bytestring library provides,
      
      ```lang=haskell
      break :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString)
      breakByte :: Word8 -> ByteString -> (ByteString, ByteString)
      ```
      
      and a rule
      
      ```
      forall x. break ((==) x) = breakByte x
      ```
      
      since `breakByte` implments an optimized version of `break (== x)` for
      known `x :: Word8`. If we allow `(==)` to be inlined too early, we will
      prevent this rule from firing. This was the cause of #11688.
      
      This patch just defers the `Eq` methods, although it's likely worthwhile
      giving `Ord` this same treatment. This regresses compiler allocations
      for T9661 by about 8% due to the additional inlining that we now require
      the simplifier to perform.
      
      Updates the `bytestring` submodule to include updated rewrite rules
      which match on `eqWord8` instead of `(==)`.
      
      Test Plan:
       * Validate, examine performance impact
      
      Reviewers: simonpj, hvr, austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1980
      
      GHC Trac Issues: #11688
      
      (cherry picked from commit 0bd0c31e)
      ed3398d1
  7. 23 Mar, 2016 1 commit
  8. 13 Mar, 2016 1 commit
    • eir@cis.upenn.edu's avatar
      Address #11471 by putting RuntimeRep in kinds. · 223ef8db
      eir@cis.upenn.edu authored and Ben Gamari's avatar Ben Gamari committed
      See Note [TYPE] in TysPrim. There are still some outstanding
      pieces in #11471 though, so this doesn't actually nail the bug.
      
      This commit also contains a few performance improvements:
      
      * Short-cut equality checking of nullary type syns
      
      * Compare types before kinds in eqType
      
      * INLINE coreViewOneStarKind
      
      * Store tycon binders separately from kinds.
      
      This resulted in a ~10% performance improvement in compiling
      the Cabal package. No change in functionality other than
      performance. (This affects the interface file format, though.)
      
      This commit updates the haddock submodule.
      
      (cherry picked from commit d8c64e86)
      223ef8db
  9. 11 Mar, 2016 2 commits
    • Ben Gamari's avatar
      Use catchException in a few more places · caef2856
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      These are cases in the standard library that may benefit from the
      strictness signature of catchException and where we know that the action
      won't bottom.
      
      Test Plan: Validate, carefully consider changed callsites
      
      Reviewers: austin, hvr
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1972
      
      (cherry picked from commit a1c4230e)
      caef2856
    • Ben Gamari's avatar
      Make `catch` lazy in the action · 2e0ef457
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      Previously
      ```lang=haskell
      catch (error "uh oh") (\(_ :: SomeException) -> print "it failed")
      ```
      would unexpectedly fail with "uh oh" instead of the handler being run
      due to the strictness of `catch` in its first argument. See #11555 for
      details.
      
      Test Plan: Validate
      
      Reviewers: austin, hvr, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1973
      
      GHC Trac Issues: #11555
      
      (cherry picked from commit 30ee9102)
      2e0ef457
  10. 29 Feb, 2016 1 commit
    • Ryan Scott's avatar
      Missing Proxy instances, make U1 instance more Proxy-like · 18e5edc0
      Ryan Scott authored and Ben Gamari's avatar Ben Gamari committed
      This accomplishes three things:
      
      * Adds missing `Alternative`, `MonadPlus`, and `MonadZip` instances for
        `Proxy`
      * Adds a missing `MonadPlus` instance for `U1`
      * Changes several existing `U1` instances to use lazy pattern-matching,
        exactly how `Proxy` does it (in case we ever replace `U1` with
        `Proxy`). This is technically a breaking change (albeit an extremely
        minor one).
      
      Test Plan: ./validate
      
      Reviewers: austin, ekmett, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1962
      
      GHC Trac Issues: #11650
      
      (cherry picked from commit 171d95df)
      18e5edc0
  11. 27 Feb, 2016 6 commits
    • Ben Gamari's avatar
      GHC.Generics: Ensure some, many for U1 don't bottom · b89747e3
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      Reviewers: austin, hvr, ekmett, RyanGlScott
      
      Reviewed By: RyanGlScott
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1952
      
      GHC Trac Issues: #11650
      
      (cherry picked from commit 890e2bb7)
      b89747e3
    • Ryan Scott's avatar
      Add more type class instances for GHC.Generics · 1fcddf82
      Ryan Scott authored and Ben Gamari's avatar Ben Gamari committed
      GHC.Generics provides several representation data types that have
      obvious instances of various type classes in base, along with various
      other types of meta-data (such as associativity and fixity).
      Specifically, instances have been added for the following type classes
      (where possible):
      
          - Applicative
          - Data
          - Functor
          - Monad
          - MonadFix
          - MonadPlus
          - MonadZip
          - Foldable
          - Traversable
          - Enum
          - Bounded
          - Ix
          - Generic1
      
      Thanks to ocharles for starting this!
      
      Test Plan: Validate
      
      Reviewers: ekmett, austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: RyanGlScott, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1937
      
      GHC Trac Issues: #9043
      
      (cherry picked from commit 673efccb)
      1fcddf82
    • thomie's avatar
      Handle multiline named haddock comments properly · a69542ba
      thomie authored and Ben Gamari's avatar Ben Gamari committed
      Fixes #10398 in a different way, thereby also fixing #11579.
      
      I inverted the logic of the Bool argument to "worker", to hopefully make
      it more self-explanatory.
      
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1935
      
      (cherry picked from commit 6350eb11)
      a69542ba
    • Facundo Domínguez's avatar
      Overload the static form to reduce verbosity. · 70287bce
      Facundo Domínguez authored and Ben Gamari's avatar Ben Gamari committed
      Static pointers are rarely used naked: most often they are defined at
      the base of a Closure, as defined in e.g. the distributed-closure and
      distributed-static packages. So a typical usage pattern is:
      
          distributeMap (closure (static (\x -> x * 2)))
      
      which is more verbose than it needs to be. Ideally we'd just have to
      write
      
          distributeMap (static (\x -> x * 2))
      
      and let the static pointer be lifted to a Closure implicitly. i.e.
      what we want is to overload static literals, just like we already
      overload list literals and string literals.
      
      This is achieved by introducing the IsStatic type class and changing
      the typing rule for static forms slightly:
      
          static (e :: t) :: IsStatic p => p t
      
      Test Plan: ./validate
      
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: simonpj, mboes, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1923
      
      GHC Trac Issues: #11585
      
      (cherry picked from commit c1efdcc4)
      70287bce
    • David Turner's avatar
      base: A selection of fixes to the comments in GHC.Stats · 2b790258
      David Turner authored and Ben Gamari's avatar Ben Gamari committed
      Use `-- |` comments throughout.
      Note that numByteUsageSamples is also the number of major GCs
      Note that numGcs counts GCs for all generations
      Note that 'current' really means 'at the end of the last major GC'
      
      Reviewers: ezyang, hvr, simonmar, austin, bgamari
      
      Reviewed By: ezyang, simonmar, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1929
      
      GHC Trac Issues: #11603
      
      (cherry picked from commit 8e19d3a3)
      2b790258
    • thomie's avatar
      Fix GHC.Stats documentation markup (#11619) · 05e83aac
      thomie authored and Ben Gamari's avatar Ben Gamari committed
      (cherry picked from commit bb9cd454)
      05e83aac
  12. 18 Feb, 2016 1 commit
    • Ryan Scott's avatar
      Add IsList instance for CallStack, restore Show instance for CallStack · 80beb40e
      Ryan Scott authored and Ben Gamari's avatar Ben Gamari committed
      Summary:
      Ties up loose ends from D1894.
      
      GHC 7.10.2 and 7.10.3 featured a `Show` instance for `CallStack`, but since it
      was derived, it broke encapsulation. This adds a `Show` instance which displays
      the `CallStack` as if it were a `[(String, SrcLoc)]`.
      
      To ensure that the output of `Show` is technically a valid Haskell term, we
      also add a corresponding `IsList CallStack` instance.
      
      Reviewers: gridaphobe, austin, hvr, bgamari
      
      Reviewed By: gridaphobe, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1903
      
      (cherry picked from commit be3d7f66)
      80beb40e
  13. 11 Feb, 2016 1 commit
  14. 07 Feb, 2016 1 commit
  15. 06 Feb, 2016 2 commits
  16. 01 Feb, 2016 1 commit
    • Eric Seidel's avatar
      Hide the CallStack implicit parameter · ac909501
      Eric Seidel authored and Ben Gamari's avatar Ben Gamari committed
      The implicit parameter isn't actually very relevant to the CallStack
      machinery, so we hide the implementation details behind a constraint
      alias
      
      ```
      type HasCallStack = (?callStack :: CallStack)
      ```
      
      This has a few benefits:
      
      1. No need to enable `ImplicitParams` in user code.
      2. No need to remember the `?callStack` naming convention.
      3. Gives us the option to change the implementation details in the
      future with less user-land breakage.
      
      The revised `CallStack` API is exported from `GHC.Stack` and makes no
      mention of the implicit parameter.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, austin, hvr, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Projects: #ghc
      
      Differential Revision: https://phabricator.haskell.org/D1818
      
      (cherry picked from commit 94048f9f)
      ac909501
  17. 27 Jan, 2016 1 commit
    • Ryan Scott's avatar
      Split off -Wunused-type-variables from -Wunused-matches · 2d3f2778
      Ryan Scott authored and Ben Gamari's avatar Ben Gamari committed
      Summary:
      Previously, `-Wunused-matches` would fire whenever it detected unused type
      variables in a type family or data family instance. This can be annoying for
      users who wish to use type variable names as documentation, as being
      `-Wall`-compliant would mean that they'd have to prefix many of their type
      variable names with underscores, making the documentation harder to read.
      
      To avoid this, a new warning `-Wunused-type-variables` was created that only
      encompasses unused variables in family instances. `-Wunused-matches` reverts
      back to its role of only warning on unused term-level pattern names. Unlike
      `-Wunused-matches`, `-Wunused-type-variables` is not implied by `-Wall`.
      
      Fixes #11451.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, ekmett, austin, hvr, simonpj, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1825
      
      GHC Trac Issues: #11451
      
      (cherry picked from commit 6817703b)
      2d3f2778
  18. 22 Jan, 2016 1 commit
  19. 18 Jan, 2016 1 commit
    • Eric Seidel's avatar
      un-wire-in error, undefined, CallStack, and IP · b31aafb7
      Eric Seidel authored and Ben Gamari's avatar Ben Gamari committed
      I missed a crucial step in the wiring-in process of `CallStack` in D861,
      the bit where you actually wire-in the Name... This led to a nasty bug
      where GHC thought `CallStack` was not wired-in and tried to fingerprint
      it, which failed because the defining module was not loaded.
      
      But we don't need `CallStack` to be wired-in anymore since `error` and
      `undefined` no longer need to be wired-in. So we just remove them all.
      
      Updates haddock submodule.
      
      Test Plan: `./validate` and `make slowtest TEST=tc198`
      
      Reviewers: simonpj, goldfire, austin, hvr, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: goldfire, thomie
      
      Projects: #ghc
      
      Differential Revision: https://phabricator.haskell.org/D1739
      
      GHC Trac Issues: #11331
      
      (cherry picked from commit a7b751db)
      b31aafb7
  20. 14 Jan, 2016 1 commit
  21. 13 Jan, 2016 1 commit
    • Simon Marlow's avatar
      Add -prof stack trace to assert · b54ea294
      Simon Marlow authored and Ben Gamari's avatar Ben Gamari committed
      Summary:
      So that assertion failures have full call stack information attached
      when using `ghc -fexternal-interpreter -prof`.  Here's one I just
      collected by inserting a dummy assert in Happy:
      
      ```
      *** Exception: Assertion failed
      CallStack (from ImplicitParams):
        assert, called at ./First.lhs:37:11 in main:First
      CallStack (from -prof):
        First.mkFirst (First.lhs:37:11-27)
        First.mkFirst (First.lhs:37:11-93)
        Main.main2.runParserGen.first (Main.lhs:107:48-56)
        Main.main2.runParserGen.first (Main.lhs:107:27-57)
        Main.main2.runParserGen (Main.lhs:(96,9)-(276,9))
        Main.main2.runParserGen (Main.lhs:(90,9)-(276,10))
        Main.main2.runParserGen (Main.lhs:(86,9)-(276,10))
        Main.main2.runParserGen (Main.lhs:(85,9)-(276,10))
        Main.main2 (Main.lhs:74:20-43)
        Main.main2 (Main.lhs:(64,9)-(78,61))
        Main.main (Main.lhs:57:9-18)
      ```
      
      Test Plan: validate
      
      Reviewers: erikd, hvr, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1765
      
      GHC Trac Issues: #11047
      
      (cherry picked from commit 6cb860a9)
      b54ea294
  22. 08 Jan, 2016 1 commit
    • Jonas Scholl's avatar
      Improve GHC.Event.IntTable performance · 91bd13cd
      Jonas Scholl authored and Ben Gamari's avatar Ben Gamari committed
      Speed up GHC.Event.IntTable.lookup by removing the IO context from the
      go helper function. This generates a little bit better code as we can
      avoid repeating the stack check.
      
      Remove unused parameter from GHC.Event.IntTable.updateWith.go and
      directly return a bool instead of a maybe and then checking that whether
      it is a Nothing.
      
      Test Plan: validate
      
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1742
      
      GHC Trac Issues: #8793
      
      (cherry picked from commit 9034824055964e32140f95267a70e4b9e9171db6)
      91bd13cd
  23. 04 Jan, 2016 1 commit
  24. 29 Dec, 2015 1 commit
    • Rik Steenkamp's avatar
      Modify getFullArgs to include program name · b093e631
      Rik Steenkamp authored and Ben Gamari's avatar Ben Gamari committed
      Fixes an inconsistency of `getFullArgs` across operating systems. On
      non-Windows systems the returning list did not include the program name
      as the first element, while on Windows systems it did.
      
      As `System.Environment` depends on this behaviour of `getFullArgs` under
      Windows, this is now the behaviour across all operating systems.
      Computation `getFullArgs` is now like the "raw" version of `getArgs`,
      similar to `argv` in other languages.
      
      This patch also fixes T10728 under Windows.
      
      Reviewers: austin, hvr, erikd, #ghc_windows_task_force, Phyx, bgamari
      
      Reviewed By: #ghc_windows_task_force, Phyx, bgamari
      
      Subscribers: Phyx, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1713
      b093e631
  25. 23 Dec, 2015 1 commit
    • Eric Seidel's avatar
      Allow CallStacks to be frozen · 380b25ea
      Eric Seidel authored and Ben Gamari's avatar Ben Gamari committed
      This introduces "freezing," an operation which prevents further
      locations from being appended to a CallStack.  Library authors may want
      to prevent CallStacks from exposing implementation details, as a matter
      of hygiene. For example, in
      
      ```
      head [] = error "head: empty list"
      
      ghci> head []
      *** Exception: head: empty list
      CallStack (from implicit params):
        error, called at ...
      ```
      
      including the call-site of `error` in `head` is not strictly necessary
      as the error message already specifies clearly where the error came
      from.
      
      So we add a function `freezeCallStack` that wraps an existing CallStack,
      preventing further call-sites from being pushed onto it. In other words,
      
      ```
      pushCallStack callSite (freezeCallStack callStack) = freezeCallStack callStack
      ```
      
      Now we can define `head` to not produce a CallStack at all
      
      ```
      head [] =
        let ?callStack = freezeCallStack emptyCallStack
        in error "head: empty list"
      
      ghci> head []
      *** Exception: head: empty list
      CallStack (from implicit params):
        error, called at ...
      ```
      
      ---
      
      1. We add the `freezeCallStack` and `emptyCallStack` and update the
         definition of `CallStack` to support this functionality.
      
      2. We add `errorWithoutStackTrace`, a variant of `error` that does not
         produce a stack trace, using this feature. I think this is a sensible
         wrapper function to provide in case users want it.
      
      3. We replace uses of `error` in base with `errorWithoutStackTrace`. The
         rationale is that base does not export any functions that use CallStacks
         (except for `error` and `undefined`) so there's no way for the stack
         traces (from Implicit CallStacks) to include user-defined functions.
         They'll only contain the call to `error` itself. As base already has a
         good habit of providing useful error messages that name the triggering
         function, the stack trace really just adds noise to the error. (I don't
         have a strong opinion on whether we should include this third commit,
         but the change was very mechanical so I thought I'd include it anyway in
         case there's interest)
      
      4. Updates tests in `array` and `stm` submodules
      
      Test Plan: ./validate, new test is T11049
      
      Reviewers: simonpj, nomeata, goldfire, austin, hvr, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Projects: #ghc
      
      Differential Revision: https://phabricator.haskell.org/D1628
      
      GHC Trac Issues: #11049
      380b25ea
  26. 21 Dec, 2015 4 commits
    • Simon Marlow's avatar
      Maintain cost-centre stacks in the interpreter · c8c44fd9
      Simon Marlow authored
      Summary:
      Breakpoints become SCCs, so we have detailed call-stack info for
      interpreted code.  Currently this only works when GHC is compiled with
      -prof, but D1562 (Remote GHCi) removes this constraint so that in the
      future call stacks will be available without building your own GHCi.
      
      How can you get a stack trace?
      
      * programmatically: GHC.Stack.currentCallStack
      * I've added an experimental :where command that shows the stack when
        stopped at a breakpoint
      * `error` attaches a call stack automatically, although since calls to
        `error` are often lifted out to the top level, this is less useful
        than it might be (ImplicitParams still works though).
      * Later we might attach call stacks to all exceptions
      
      Other related changes in this diff:
      
      * I reduced the number of places that get ticks attached for
        breakpoints.  In particular there was a breakpoint around the whole
        declaration, which was often redundant because it bound no variables.
        This reduces clutter in the stack traces and speeds up compilation.
      
      * I tidied up some RealSrcSpan stuff in InteractiveUI, and made a few
        other small cleanups
      
      Test Plan: validate
      
      Reviewers: ezyang, bgamari, austin, hvr
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1595
      
      GHC Trac Issues: #11047
      c8c44fd9
    • Ryan Scott's avatar
      Encode strictness in GHC generics metadata · ee6fba89
      Ryan Scott authored and Ben Gamari's avatar Ben Gamari committed
      This augments `MetaSel` with a `Bang` field, which gives generic
      programmers access to the following information about each field
      selector:
      
      * `SourceUnpackedness`: whether a field was marked `{-# NOUNPACK #-}`,
        `{-# UNPACK #-}`, or not
      * `SourceStrictness`: whether a field was given a strictness (`!`) or
        laziness (`~`) annotation
      * `DecidedStrictness`: what strictness GHC infers for a field during
        compilation, which may be influenced by optimization levels,
        `-XStrictData`, `-funbox-strict-fields`, etc.
      
      Unlike in Phab:D1603, generics does not grant a programmer the ability
      to "splice" in metadata, so there is no issue including
      `DecidedStrictness` with `Bang` (whereas in Template Haskell, it had to
      be split off).
      
      One consequence of this is that `MetaNoSel` had to be removed, since it
      became redundant. The `NoSelector` empty data type was also removed for
      similar reasons.
      
      Fixes #10716.
      
      Test Plan: ./validate
      
      Reviewers: dreixel, goldfire, kosmikus, austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1646
      
      GHC Trac Issues: #10716
      ee6fba89
    • dolio's avatar
      Implement phase 1 of expanded Floating · 6457903e
      dolio authored and Ben Gamari's avatar Ben Gamari committed
      - This part of the proposal is to add log1p, expm1, log1pexp and
        log1mexp to the Floating class, and export the full Floating class
        from Numeric
      
      Reviewers: ekmett, #core_libraries_committee, bgamari, hvr, austin
      
      Reviewed By: ekmett, #core_libraries_committee, bgamari
      
      Subscribers: Phyx, RyanGlScott, ekmett, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1605
      
      GHC Trac Issues: #11166
      6457903e
    • msosn's avatar
      Warn about unused type variables in type families · eb7796f1
      msosn authored and Ben Gamari's avatar Ben Gamari committed
      The warnings are enabled with the flag -fwarn-unused-matches, the same
      one that enables warnings on the term level.
      
      Identifiers starting with an underscore are now always parsed as type
      variables.  When the NamedWildCards extension is enabled, the renamer
      replaces those variables with named wildcards.
      
      An additional NameSet nwcs is added to LocalRdrEnv. It's used to keep
      names of the type variables that should be replaced with wildcards.
      
      While renaming HsForAllTy, when a name is explicitly bound it is removed
      from the nwcs NameSet. As a result, the renamer doesn't replace them in
      the quantifier body. (Trac #11098)
      
      Fixes #10982, #11098
      
      Reviewers: alanz, bgamari, hvr, austin, jstolarek
      
      Reviewed By: jstolarek
      
      Subscribers: goldfire, mpickering, RyanGlScott, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1576
      
      GHC Trac Issues: #10982
      eb7796f1
  27. 17 Dec, 2015 1 commit
    • thomie's avatar
      IO Handles: update comments [skip ci] · 1b6323b3
      thomie authored
      * hSetEcho, hGetEcho and hIsTerminalDevice are part of the Haskell2010
      report (but not Haskell98)
      
      * there are great `Note`s in GHC.IO.Handle.Types. Link to them.
      1b6323b3
  28. 16 Dec, 2015 2 commits
    • Ben Gamari's avatar
      GHC.Stack: Fix Haddock markup · d36e9e12
      Ben Gamari authored
      d36e9e12
    • Herbert Valerio Riedel's avatar
      Start using `-W` instead of `-f(no-)warn` in some places · 437ebdda
      Herbert Valerio Riedel authored
      This replaces some occurences of `-f(no-)warn` with the new `-W`-aliases
      introduced via 2206fa8c / #11218, in cases which are guaranteed
      to be invoked with recent enough GHC (i.e. the stage1+ GHC).
      
      After this commit, mostly the compiler and the testsuite remain using
      `-f(wo-)warn...` because the compiler needs to be bootstrappable with
      older GHCs, while for the testsuite it's convenient to be able to quickly
      compare the behavior to older GHCs (which may not support the new flags yet).
      
      The compiler-part can be updated to use the new flags once GHC 8.3 development
      starts.
      
      Reviewed By: quchen
      
      Differential Revision: https://phabricator.haskell.org/D1637
      437ebdda
  29. 15 Dec, 2015 1 commit