Skip to content
Snippets Groups Projects
  1. Jun 16, 2019
  2. Jun 15, 2019
  3. Jun 14, 2019
    • Ben Gamari's avatar
      PrelRules: Don't break let/app invariant in shiftRule · 5279dda8
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Previously shiftRule would rewrite as invalid shift like
      ```
      let x = I# (uncheckedIShiftL# n 80)
      in ...
      ```
      to
      ```
      let x = I# (error "invalid shift")
      in ...
      ```
      However, this breaks the let/app invariant as `error` is not
      okay-for-speculation. There isn't an easy way to avoid this so let's not
      try. Instead we just take advantage of the undefined nature of invalid
      shifts and return zero.
      
      Fixes #16742.
      5279dda8
    • Andrew Martin's avatar
      Implement the -XUnliftedNewtypes extension. · effdd948
      Andrew Martin authored and Marge Bot's avatar Marge Bot committed
      GHC Proposal: 0013-unlifted-newtypes.rst
      Discussion: https://github.com/ghc-proposals/ghc-proposals/pull/98
      
      
      Issues: #15219, #1311, #13595, #15883
      Implementation Details:
        Note [Implementation of UnliftedNewtypes]
        Note [Unifying data family kinds]
        Note [Compulsory newtype unfolding]
      
      This patch introduces the -XUnliftedNewtypes extension. When this
      extension is enabled, GHC drops the restriction that the field in
      a newtype must be of kind (TYPE 'LiftedRep). This allows types
      like Int# and ByteArray# to be used in a newtype. Additionally,
      coerce is made levity-polymorphic so that it can be used with
      newtypes over unlifted types.
      
      The bulk of the changes are in TcTyClsDecls.hs. With -XUnliftedNewtypes,
      getInitialKind is more liberal, introducing a unification variable to
      return the kind (TYPE r0) rather than just returning (TYPE 'LiftedRep).
      When kind-checking a data constructor with kcConDecl, we attempt to
      unify the kind of a newtype with the kind of its field's type. When
      typechecking a data declaration with tcTyClDecl, we again perform a
      unification. See the implementation note for more on this.
      
      Co-authored-by: Richard Eisenberg's avatarRichard Eisenberg <rae@richarde.dev>
      effdd948
  4. Jun 13, 2019
  5. Jun 12, 2019
  6. Jun 11, 2019
    • Alp Mestanogullari's avatar
      testsuite/mk/boilerplate.mk: rename 'ghc-config-mk' to 'ghc_config_mk' · aad6115a
      Alp Mestanogullari authored and Marge Bot's avatar Marge Bot committed
      Make/shell variable names which contain dashes can cause problems under
      some conditions. The 'ghc-config-mk' variable from testsuite/mk/boilerplate.mk
      that I made overridable (by Hadrian) in ba0aed2e was working as expected when
      our Hadrian/Linux job was based off the deb8 Docker image, but broke when
      I switched the job to use our deb9-based image, in 3d97bad6. The exact
      circumstances/tool versions that trigger this problem are unknown, but
      changing the variable's name to 'ghc_config_mk' lets us work around the issue.
      
      This fixes the annth_compunits and annth_make test failures that showed up
      when we switched the Hadrian/Linux job to use the deb9 environment.
      aad6115a
    • Alec Theriault's avatar
      Make `haddock_testsuite` respect `--test-accept` · 45616133
      Alec Theriault authored and Marge Bot's avatar Marge Bot committed
      Suppose you've made changes that affect the output of `haddockHtmlTest`
      so that the following is failing:
      
          ./hadrian/build.sh -c --only=haddockHtmlTest test
      
      Then, the following will accept new output for Haddock's test cases.
      
          ./hadrian/build.sh -c --only=haddockHtmlTest test --test-accept
      
      You still do need to make sure those new changes (which show up in
      Haddock's tree) get committed though.
      
      Fixes #16694
      45616133
    • Alp Mestanogullari's avatar
      Refine the GHCI macro into HAVE[_{INTERNAL, EXTERNAL}]_INTERPRETER · 39f50bff
      Alp Mestanogullari authored and Marge Bot's avatar Marge Bot committed
      As discussed in #16331, the GHCI macro, defined through 'ghci' flags
      in ghc.cabal.in, ghc-bin.cabal.in and ghci.cabal.in, is supposed to indicate
      whether GHC is built with support for an internal interpreter, that runs in
      the same process. It is however overloaded in a few places to mean
      "there is an interpreter available", regardless of whether it's an internal
      or external interpreter.
      
      For the sake of clarity and with the hope of more easily being able to
      build stage 1 GHCs with external interpreter support, this patch splits
      the previous GHCI macro into 3 different ones:
      
      - HAVE_INTERNAL_INTERPRETER: GHC is built with an internal interpreter
      - HAVE_EXTERNAL_INTERPRETER: GHC is built with support for external interpreters
      - HAVE_INTERPRETER: HAVE_INTERNAL_INTERPRETER || HAVE_EXTERNAL_INTERPRETER
      39f50bff
    • Yuras's avatar
      Warn about unused packages · fe7e7e4a
      Yuras authored and Marge Bot's avatar Marge Bot committed
      Reviewers: bgamari, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: hvr, simonpj, mpickering, rwbarton, carter
      
      GHC Trac Issues: #15838
      
      Differential Revision: https://phabricator.haskell.org/D5285
      fe7e7e4a
  7. Jun 10, 2019
  8. Jun 09, 2019
    • Ben Gamari's avatar
      testsuite: Add test for #16509 · 8a48a8a4
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      8a48a8a4
    • Alex D's avatar
      Do not report error if Name in pragma is unbound · ed20412a
      Alex D authored and Marge Bot's avatar Marge Bot committed
      ed20412a
    • Roland Senn's avatar
      Add disable/enable commands to ghci debugger #2215 · 10452959
      Roland Senn authored and Marge Bot's avatar Marge Bot committed
      This patch adds two new commands `:enable` and `:disable` to the GHCi debugger.
      Opposite to `:set stop <n> :continue` a breakpoint disabled with `:disable` will
      not loose its previously set stop command.
      A new field breakEnabled is added to the BreakLocation data structure to
      track the enable/disable state. When a breakpoint is disabled with a `:disable`
      command, the following happens:
      
      The corresponding BreakLocation data element is searched dictionary of the
      `breaks` field of the GHCiStateMonad. If the break point is found and not
      already in the disabled state, the breakpoint is removed from bytecode.
      The BreakLocation data structure is kept in the breaks list and the new
      breakEnabled field is set to false.
      
      The `:enable` command works similar.
      
      The breaks field in the GHCiStateMonad was changed from an association list
      to int `IntMap`.
      10452959
Loading