1. 15 Jun, 2018 15 commits
    • Sylvain Henry's avatar
      Built-in Natural literals in Core · fe770c21
      Sylvain Henry authored
      Add support for built-in Natural literals in Core.
      
      - Replace MachInt,MachWord, LitInteger, etc. with a single LitNumber
        constructor with a LitNumType field
      - Support built-in Natural literals
      - Add desugar warning for negative literals
      - Move Maybe(..) from GHC.Base to GHC.Maybe for module dependency
        reasons
      
      This patch introduces only a few rules for Natural literals (compared
      to Integer's rules). Factorization of the built-in rules for numeric
      literals will be done in another patch as this one is already big to
      review.
      
      Test Plan:
        validate
        test build with integer-simple
      
      Reviewers: hvr, bgamari, goldfire, Bodigrim, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: phadej, simonpj, RyanGlScott, carter, hsyl20, rwbarton,
      thomie
      
      GHC Trac Issues: #14170, #14465
      
      Differential Revision: https://phabricator.haskell.org/D4212
      fe770c21
    • Kirill Zaborsky's avatar
      Fix #13833: accept type literals with no FlexibleInstances · 42f3b53b
      Kirill Zaborsky authored
      Test Plan: ./validate
      
      Reviewers: bgamari, simonpj
      
      Reviewed By: bgamari, simonpj
      
      Subscribers: simonpj, rwbarton, thomie, carter
      
      GHC Trac Issues: #13833
      
      Differential Revision: https://phabricator.haskell.org/D4823
      42f3b53b
    • Adam Gundry's avatar
      Use data con name instead of parent in lookupRecFieldOcc · 7100850e
      Adam Gundry authored
      Test Plan: new tests rename/should_compile/{T14747,T15149}
      
      Reviewers: simonpj, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #14747, #15149
      
      Differential Revision: https://phabricator.haskell.org/D4821
      7100850e
    • Ben Gamari's avatar
      Make dtrace enabled GHC work as a bootstrap compiler on FreeBSD · 9c89ef39
      Ben Gamari authored
      Fixes #15040.
      
      Reviewers: bgamari, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4772
      9c89ef39
    • Tao He's avatar
      Add "quantified constraint" context in error message, fix #15231. · 91822e4e
      Tao He authored
      This patch adds "quantified constraint" context in error message when
      UndecidableInstances checking fails for quantified constraints.
      See Trac #15231:comment#1.
      
      This patch also pretty-prints the instance head for better error messages.
      
      Test Plan: make test TEST="T15231"
      
      Reviewers: bgamari, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, rwbarton, thomie, carter
      
      GHC Trac Issues: #15231
      
      Differential Revision: https://phabricator.haskell.org/D4819
      91822e4e
    • Matthew Pickering's avatar
      Make NameSort note into proper Note · b67b9717
      Matthew Pickering authored
      Reviewers: adamgundry, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4826
      b67b9717
    • Vladislav Zavialov's avatar
      No Unicode in Parser.y · 78f5344e
      Vladislav Zavialov authored
      Unicode characters in Parser.y cause build failures
      on systems where the locale does not support Unicode.
      
      See https://mail.haskell.org/pipermail/ghc-devs/2018-June/015874.html
      
      Test Plan: ./validate
      
      Reviewers: bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, mpickering, carter
      
      Differential Revision: https://phabricator.haskell.org/D4850
      78f5344e
    • Ben Gamari's avatar
      Bump supported LLVM version to 6.0 · e6498d67
      Ben Gamari authored
      This seems to fix a number of segmentation faults.
      e6498d67
    • Ben Gamari's avatar
      testsuite: Make T4442 compile on i386 and mark as broken · b7deeed0
      Ben Gamari authored
      There are some rather suspicious failures in the 64-bit case. See #15184 for
      details.
      b7deeed0
    • Nathan Collins's avatar
      Fix documentation for `-dth-dec-file` · 69954a12
      Nathan Collins authored
      The docs said that it took a file argument, as in
      `-dth-dec-file=<file>`, but it does not take a file argument!
      69954a12
    • Ben Gamari's avatar
      circleci: Remove systemd from Fedora nsswitch configuration · dbe5370e
      Ben Gamari authored
      Lest we end up with a non-functional user/group lookup, resulting in #15230.
      dbe5370e
    • Simon Peyton Jones's avatar
      Make better "fake tycons" in error recovery · 2f6069cc
      Simon Peyton Jones authored
      Consider (Trac #15215)
        data T a = MkT ...
        data S a = ...T...MkT....
      
      If there is an error in the definition of 'T' we add a
      "fake type constructor" to the type environment, so that we
      can continue to typecheck 'S'.  But we /were not/ adding
      a fake anything for 'MkT' and so there was an internal
      error when we met 'MkT' in the body of 'S'.
      
      The fix is to add fake tycons for all the 'implicits' of 'T'.
      This is done by mk_fake_tc in TcTyClsDecls.checkValidTyCl,
      which now returns a /list/ of TyCons rather than just one.
      
      On the way I did some refactoring:
      
      * Rename TcTyDecls.tcAddImplicits to tcAddTyConsToGblEnv
        and make it /include/ the TyCons themeselves as well
        as their implicits
      
      * Some incidental refactoring about tcRecSelBinds. The main
        thing is that I've avoided creating a HsValBinds that we
        immediately decompose.  That meant moving some deck chairs
        around.
      
      NB: The new error message for the regression test T15215
      has the opaque error "Illegal constraint in a type:", flagged
      in Trac #14845.  But that's the fault of the latter ticket.
      The fix here not to blame.
      2f6069cc
    • Simon Peyton Jones's avatar
      Fix corner case in typeKind, plus refactoring · f903e551
      Simon Peyton Jones authored
      This is a continuation of
      
          commit 9d600ea6
          Author: Simon Peyton Jones <simonpj@microsoft.com>
          Date:   Fri Jun 1 16:36:57 2018 +0100
      
              Expand type synonyms when Linting a forall
      
      That patch pointed out that there was a lurking hole in
      typeKind, where it could return an ill-scoped kind, because
      of not expanding type synonyms enough.
      
      This patch fixes it, quite nicely
      
      * Use occCheckExpand to expand those synonyms (it was always
        designed for that exact purpose), and call it from
               Type.typeKind
               CoreUtils.coreAltType
               CoreLint.lintTYpe
      
      * Consequently, move occCheckExpand from TcUnify.hs to
        Type.hs, and generalise it to take a list of type variables.
      
      I also tidied up lintType a bit.
      f903e551
    • Simon Peyton Jones's avatar
      Fix the bind-recovery type · 807ab222
      Simon Peyton Jones authored
      This patch uses (forall (a::*). a) for the type to
      use when recovering from an error in a binding.
      
      Previously (Trac #15276) we had (forall r (a :: TYPE r). a),
      which is ill-kinded.
      
      It's quite hard to provoke an error arising from this, because
      it only happens in programs that have a type error anyway,
      but in a subequent patch I make typeKind fall over if it returns
      an ill-scoped kind, and that makes ghci/scripts/T13202 crash
      without this fix.
      807ab222
    • Sergei Trofimovich's avatar
      UNREG: PprC: add support for of W16 literals (Ticket #15237) · 01c9d95a
      Sergei Trofimovich authored
      Fix UNREG build failure for 32-bit targets.
      
      This change is an equivalent of commit
      0238a6c7
      
      
      ("UNREG: PprC: add support for of W32 literals")
      
      The change allows combining two subwords into one word
      on 32-bit targets. Tested on nios2-unknown-linux-gnu.
      
      GHC Trac Issues: #15237
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      01c9d95a
  2. 14 Jun, 2018 25 commits