This project is mirrored from https://gitlab.haskell.org/ghc/ghc.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 12 Dec, 2015 2 commits
    • Eric Seidel's avatar
      Rework the Implicit CallStack solver to handle local lets. · 3ec8288a
      Eric Seidel authored
      We can't just solve CallStack constraints indiscriminately when they
      occur in the RHS of a let-binder. The top-level given CallStack (if
      any) will not be in scope, so I've re-worked the CallStack solver as
      follows:
      
      1. CallStacks are treated like regular IPs unless one of the following
         two rules apply.
      
      2. In a function call, we push the call-site onto a NEW wanted
         CallStack, which GHC will solve as a regular IP (either directly from a
         given, or by quantifying over it in a local let).
      
      3. If, after the constraint solver is done, any wanted CallStacks
         remain, we default them to the empty CallStack. This rule exists mainly
         to clean up after rule 2 in a top-level binder with no given CallStack.
      
      In rule (2) we have to be careful to emit the new wanted with an
      IPOccOrigin instead of an OccurrenceOf origin, so rule (2) doesn't fire
      again. This is a bit shady but I've updated the Note to explain the
      trick.
      
      Test Plan: validate
      
      Reviewers: simonpj, austin, bgamari, hvr
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1422
      
      GHC Trac Issues: #10845
      3ec8288a
    • Matthew Pickering's avatar
      Implement -fwarn-missing-pat-syn-sigs · 1883afb2
      Matthew Pickering authored
      This adds a warning when a pattern synonym is not accompanied by a
      signature in the style of `-fwarn-missing-sigs`.
      
      It is turned on by -Wall.
      
      If the user specifies, `-fwarn-missing-exported-signatures` with
      `-fwarn-missing-pat-syn-sigs` then it will only warn when the pattern
      synonym is exported.
      
      Test Plan: ./validate
      
      Reviewers: hvr, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1596
      
      GHC Trac Issues: #11053
      1883afb2
  2. 07 Dec, 2015 2 commits
  3. 29 Nov, 2015 2 commits
    • quchen's avatar
      Implement warnings for Semigroups as parent of Monoid · 290def72
      quchen authored
      This patch is similar to the AMP patch (#8004), which offered two
      functions:
      
        1. Warn when an instance of a class has been given, but the type does
           not have a certain superclass instance
        2. Warn when top-level definitions conflict with future Prelude names
      
      These warnings are issued as part of the new `-Wcompat` warning group.
      
      Reviewers: hvr, ekmett, austin, bgamari
      
      Reviewed By: hvr, ekmett, bgamari
      
      Subscribers: ekmett, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1539
      
      GHC Trac Issues: #11139
      290def72
    • Herbert Valerio Riedel's avatar
      Implement new -XTemplateHaskellQuotes pragma · 85fcd035
      Herbert Valerio Riedel authored
      Since f16ddcee / D876, `ghc-stage1`
      supports a subset of `-XTemplateHaskell`, but since we need Cabal to be
      able detect (so `.cabal` files can be specified accordingly, see also
      GHC #11102 which omits `TemplateHaskell` from `--supported-extensions`)
      whether GHC provides full or only partial `-XTemplateHaskell` support,
      the proper way to accomplish this is to split off the
      quotation/non-splicing `TemplateHaskell` feature-subset into a new
      language pragma `TemplateHaskellQuotes`.
      
      Moreover, `-XTemplateHaskellQuotes` is considered safe under SafeHaskell
      
      This addresses #11121
      
      Reviewers: goldfire, ezyang, dterei, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1511
      
      GHC Trac Issues: #11121
      85fcd035
  4. 25 Nov, 2015 1 commit
  5. 24 Nov, 2015 2 commits
    • quchen's avatar
      Add -Wcompat warning flag group · 6d147939
      quchen authored
      Reviewers: hvr, austin, thomie, bgamari
      
      Reviewed By: hvr, austin, thomie, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1495
      
      GHC Trac Issues: #11000
      6d147939
    • Herbert Valerio Riedel's avatar
      Implement new `-fwarn-noncanonical-monad-instances` · f09f2470
      Herbert Valerio Riedel authored
      Warn about incoherent/non-canonical 'Applicative'/'Monad' instance
      declarations. Specifically the following invariants are checked:
      
      In 'Monad' instances declarations warn if the any of the following
      conditions does not hold:
      
       * If `return` is overridden it must be canonical (i.e. `return = pure`).
       * If `(>>)` is overridden it must be canonical (i.e. `(>>) = (*>)`).
      
      In 'Applicative' instance declarations:
      
       * Warn if 'pure' is defined backwards (i.e. `pure = return`).
       * Warn if '(*>)' is defined backwards (i.e. `(*>) = (>>)`).
      
      NB, this warning flag is not enabled via `-Wall` nor `-Wcompat`.
      
      This addresses #11128
      
      Reviewers: quchen, austin, bgamari
      
      Reviewed By: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1516
      f09f2470
  6. 21 Nov, 2015 1 commit
    • roshats's avatar
      Function definition in GHCi · b98ff3cc
      roshats authored
      This patch allows define and re-define functions in ghci. `let` is not
      required anymore (but can be used).
      
      Idea: If ghci input string can be parsed as statement then run it as
      statement else run it as declaration.
      
      Reviewers: mpickering, bgamari, austin
      
      Reviewed By: mpickering, bgamari, austin
      
      Subscribers: hvr, mpickering, dterei, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1299
      
      GHC Trac Issues: #7253
      b98ff3cc
  7. 19 Nov, 2015 2 commits
  8. 18 Nov, 2015 4 commits
  9. 16 Nov, 2015 1 commit
  10. 27 Oct, 2015 1 commit
  11. 19 Oct, 2015 1 commit
  12. 16 Oct, 2015 1 commit
  13. 13 Oct, 2015 1 commit
    • Ryan Scott's avatar
      Make dataToQa aware of Data instances which use functions to implement toConstr · d2f9972a
      Ryan Scott authored
      Trac #10796 exposes a way to make `template-haskell`'s `dataToQa` function
      freak out if using a `Data` instance that produces a `Constr` (by means of
      `toConstr`) using a function name instead of a data constructor name. While
      such `Data` instances are somewhat questionable, they are nevertheless present
      in popular libraries (e.g., `containers`), so we can at least make `dataToQa`
      aware of their existence.
      
      In order to properly distinguish strings which represent variables (as opposed
      to data constructors), it was necessary to move functionality from `Lexeme` (in
      `ghc`) to `GHC.Lexeme` in a new `ghc-boot` library (which was previously named
      `bin-package-db`).
      
      Reviewed By: goldfire, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1313
      
      GHC Trac Issues: #10796
      d2f9972a
  14. 03 Oct, 2015 3 commits
    • Ryan Scott's avatar
      Fill in associated type defaults with DeriveAnyClass · 2f74be9c
      Ryan Scott authored
      Summary:
      Unlike `-XDefaultSignatures`, `-XDeriveAnyClass` would not fill in
      associated type family defaults when deriving a class which contained
      them.
      
      In order to fix this properly, `tcATDefault` needed to be used from
      `TcGenDeriv`. To avoid a module import cycle, `tcATDefault` was moved
      from `TcInstDcls` to `TcClsDcl`.
      
      Fixes #10361.
      
      Test Plan: ./validate
      
      Reviewers: kosmikus, dreixel, bgamari, austin, simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1283
      
      GHC Trac Issues: #10361
      2f74be9c
    • Ryan Scott's avatar
      Make GHC generics capable of handling unboxed types · 6cde981a
      Ryan Scott authored
      This adds a data family (`URec`) and six data family instances (`UAddr`,
      `UChar`, `UDouble`, `UFloat`, `UInt`, and `UWord`) which a `deriving
      Generic(1)` clause will generate if it sees `Addr#`, `Char#`, `Double#`,
      `Float#`, `Int#`, or `Word#`, respectively. The programmer can then
      provide instances for these data family instances to provide custom
      implementations for unboxed types, similar to how derived `Eq`, `Ord`,
      and `Show` instances currently special-case unboxed types.
      
      Fixes #10868.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, dreixel, bgamari, austin, hvr, kosmikus
      
      Reviewed By: dreixel, kosmikus
      
      Subscribers: simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1239
      
      GHC Trac Issues: #10868
      6cde981a
    • Ben Gamari's avatar
      Move user's guide to ReStructuredText · 4fd6207e
      Ben Gamari authored
      4fd6207e