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
    • Andreas Klebinger's avatar
      Add Outputable instances for Float, Double. · 3bc6df32
      Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
      3bc6df32
    • Alp Mestanogullari's avatar
      Hadrian: remove superfluous dependencies in Rules.Compile · ec25fe59
      Alp Mestanogullari authored and Marge Bot's avatar Marge Bot committed
      Each package's object files were 'need'ing the library files of all transitive
      dependencies of the current package, whichi is pointless since the said
      libraries are not needed until we link those object files together.
      
      This fixes #16759.
      ec25fe59
    • Ömer Sinan Ağacan's avatar
      Remove unused Unique field from StgFCallOp · 71e75ba6
      Ömer Sinan Ağacan authored and Marge Bot's avatar Marge Bot committed
      Fixes #16696
      71e75ba6
    • Ben Gamari's avatar
      Maintain separate flags for C++ compiler invocations · 7bc5d6c6
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Previously we would pass flags intended for the C compiler to the C++
      compiler (see #16738). This would cause, for instance, `-std=gnu99` to
      be passed to the C++ compiler, causing spurious test failures. Fix this
      by maintaining a separate set of flags for C++ compilation invocations.
      7bc5d6c6
  4. Jun 13, 2019
  5. Jun 12, 2019
Loading