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. 20 Feb, 2017 1 commit
  2. 18 Feb, 2017 1 commit
    • Ben Gamari's avatar
      Type-indexed Typeable · 8fa4bf9a
      Ben Gamari authored
      This at long last realizes the ideas for type-indexed Typeable discussed in A
      Reflection on Types (#11011). The general sketch of the project is described on
      the Wiki (Typeable/BenGamari). The general idea is that we are adding a type
      index to `TypeRep`,
      
          data TypeRep (a :: k)
      
      This index allows the typechecker to reason about the type represented by the `TypeRep`.
      This index representation mechanism is exposed as `Type.Reflection`, which also provides
      a number of patterns for inspecting `TypeRep`s,
      
      ```lang=haskell
      pattern TRFun :: forall k (fun :: k). ()
                    => forall (r1 :: RuntimeRep) (r2 :: RuntimeRep)
                              (arg :: TYPE r1) (res :: TYPE r2).
                       (k ~ Type, fun ~~ (arg -> res))
                    => TypeRep arg
                    -> TypeRep res
                    -> TypeRep fun
      
      pattern TRApp :: forall k2 (t :: k2). ()
                    => forall k1 (a :: k1 -> k2) (b :: k1). (t ~ a b)
                    => TypeRep a -> TypeRep b -> TypeRep t
      
      -- | Pattern match on a type constructor.
      pattern TRCon :: forall k (a :: k). TyCon -> TypeRep a
      
      -- | Pattern match on a type constructor including its instantiated kind
      -- variables.
      pattern TRCon' :: forall k (a :: k). TyCon -> [SomeTypeRep] -> TypeRep a
      ```
      
      In addition, we give the user access to the kind of a `TypeRep` (#10343),
      
          typeRepKind :: TypeRep (a :: k) -> TypeRep k
      
      Moreover, all of this plays nicely with 8.2's levity polymorphism, including the
      newly levity polymorphic (->) type constructor.
      
      Library changes
      ---------------
      
      The primary change here is the introduction of a Type.Reflection module to base.
      This module provides access to the new type-indexed TypeRep introduced in this
      patch. We also continue to provide the unindexed Data.Typeable interface, which
      is simply a type synonym for the existentially quantified SomeTypeRep,
      
          data SomeTypeRep where SomeTypeRep :: TypeRep a -> SomeTypeRep
      
      Naturally, this change also touched Data.Dynamic, which can now export the
      Dynamic data constructor. Moreover, I removed a blanket reexport of
      Data.Typeable from Data.Dynamic (which itself doesn't even import Data.Typeable
      now).
      
      We also add a kind heterogeneous type equality type, (:~~:), to
      Data.Type.Equality.
      
      Implementation
      --------------
      
      The implementation strategy is described in Note [Grand plan for Typeable] in
      TcTypeable. None of it was difficult, but it did exercise a number of parts of
      the new levity polymorphism story which had not yet been exercised, which took
      some sorting out.
      
      The rough idea is that we augment the TyCon produced for each type constructor
      with information about the constructor's kind (which we call a KindRep). This
      allows us to reconstruct the monomorphic result kind of an particular
      instantiation of a type constructor given its kind arguments.
      
      Unfortunately all of this takes a fair amount of work to generate and send
      through the compilation pipeline. In particular, the KindReps can unfortunately
      get quite large. Moreover, the simplifier will float out various pieces of them,
      resulting in numerous top-level bindings. Consequently we mark the KindRep
      bindings as noinline, ensuring that the float-outs don't make it into the
      interface file. This is important since there is generally little benefit to
      inlining KindReps and they would otherwise strongly affect compiler performance.
      
      Performance
      -----------
      
      Initially I was hoping to also clear up the remaining holes in Typeable's
      coverage by adding support for both unboxed tuples (#12409) and unboxed sums
      (#13276). While the former was fairly straightforward, the latter ended up being
      quite difficult: while the implementation can support them easily, enabling this
      support causes thousands of Typeable bindings to be emitted to the GHC.Types as
      each arity-N sum tycon brings with it N promoted datacons, each of which has a
      KindRep whose size which itself scales with N. Doing this was simply too
      expensive to be practical; consequently I've disabled support for the time
      being.
      
      Even after disabling sums this change regresses compiler performance far more
      than I would like. In particular there are several testcases in the testsuite
      which consist mostly of types which regress by over 30% in compiler allocations.
      These include (considering the "bytes allocated" metric),
      
       * T1969:  +10%
       * T10858: +23%
       * T3294:  +19%
       * T5631:  +41%
       * T6048:  +23%
       * T9675:  +20%
       * T9872a: +5.2%
       * T9872d: +12%
       * T9233:  +10%
       * T10370: +34%
       * T12425: +30%
       * T12234: +16%
       * 13035:  +17%
       * T4029:  +6.1%
      
      I've spent quite some time chasing down the source of this regression and while
      I was able to make som improvements, I think this approach of generating
      Typeable bindings at time of type definition is doomed to give us unnecessarily
      large compile-time overhead.
      
      In the future I think we should consider moving some of all of the Typeable
      binding generation logic back to the solver (where it was prior to
      91c6b1f5). I've opened #13261 documenting this
      proposal.
      8fa4bf9a
  3. 06 Feb, 2017 1 commit
    • David Feuer's avatar
      Add liftA2 to Applicative class · a2f39da0
      David Feuer authored
      * Make `liftA2` a method of `Applicative`.
      
      * Add explicit `liftA2` definitions to instances in `base`.
      
      * Add explicit invocations in `base`.
      
      Reviewers: ekmett, bgamari, RyanGlScott, austin, hvr
      
      Reviewed By: RyanGlScott
      
      Subscribers: ekmett, RyanGlScott, rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3031
      a2f39da0
  4. 02 Feb, 2017 2 commits
  5. 26 Jan, 2017 1 commit
  6. 20 Jan, 2017 1 commit
  7. 18 Jan, 2017 1 commit
    • Ryan Scott's avatar
      Add CBool to Foreign.C.Types · 0d769d5b
      Ryan Scott authored
      This adds a `CBool` type wrapping C99's `bool`, i.e., an `unsigned
      char`.
      
      Fixes #13136.
      
      Test Plan: ./validate on Tier-1 platforms
      
      Reviewers: austin, hvr, simonmar, bgamari
      
      Reviewed By: simonmar, bgamari
      
      Subscribers: thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D2982
      
      GHC Trac Issues: #13136
      0d769d5b
  8. 15 Jan, 2017 1 commit
    • Ryan Scott's avatar
      Properly introduce CTimer to System.Posix.Types · db91d17e
      Ryan Scott authored
      Summary:
      In ffc23270, an attempt was made at
      adding a Haskell wrapper around the C `timer_t` type. Unfortunately, GHC's
      autoconf macros weren't sophisticated enough at the time to properly detect
      that `timer_t` is represented by a `void *` (i.e., a pointer) on most OSes.
      
      This is a second attempt at `CTimer`, this time using `AC_COMPILE_IFELSE` to
      detect if a type is a pointer type by compiling the following program:
      
      ```
      type val;
      *val;
      ```
      
      This also only derives a small subset of class instances for `CTimer` that are
      known to be compatible with `Ptr` using a new `OPAQUE_TYPE_WITH_CTYPE` macro.
      
      Test Plan: ./validate
      
      Reviewers: erikd, hvr, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2952
      
      GHC Trac Issues: #12795, #12998
      db91d17e
  9. 10 Jan, 2017 1 commit
  10. 18 Dec, 2016 1 commit
    • Ryan Scott's avatar
      Fix #12998 by removing CTimer · 513eb6a0
      Ryan Scott authored
      Summary:
      CTimer is a wrapper around `timer_t`, which is a typedef for `void*`
      on most platforms. The issue is that GHC's `FPTOOLS_CHECK_HTYPE` is not robust
      enough to discern pointer types from non-pointer types, so it mistakenly labels
      `timer_t` as a `Double` or `Int32` (depending on how many bits a pointer takes
      up on your platform). This wreaks havoc when trying to give it certain type
      class instances, as noted in
      https://phabricator.haskell.org/rGHCffc2327070dbb664bdb407a804121eacb2a7c734.
      
      For now, the simplest thing to do would be removing `CTimer`, since:
      
      1. The original author (@DanielG) didn't have a particular use in mind for
         `timer_t` when he fixed #12795.
      2. `CTimer` hasn't appeared in a release of `base` yet.
      
      Fixes #12998.
      
      Reviewers: austin, hvr, bgamari, DanielG, trofi
      
      Reviewed By: bgamari, trofi
      
      Subscribers: thomie, DanielG, erikd
      
      Differential Revision: https://phabricator.haskell.org/D2876
      
      GHC Trac Issues: #12795, #12998
      513eb6a0
  11. 16 Dec, 2016 1 commit
  12. 13 Dec, 2016 1 commit
    • Ben Gamari's avatar
      base: Make raw buffer IO operations more strict · cc2e3ec0
      Ben Gamari authored
      Ticket #9696 reported that `readRawBufferPtr` and `writeRawBufferPtr`
      allocated unnecessarily. The binding is question was,
      ```
      let {
        buf_s4VD [Dmd=<L,U(U)>] :: GHC.Ptr.Ptr GHC.Word.Word8
        [LclId, Unf=OtherCon []] =
            NO_CCS GHC.Ptr.Ptr! [ds1_s4Vy];
      } in
        case
            GHC.IO.FD.$wreadRawBufferPtr
                Main.main5
                0#
                0#
                buf_s4VD
                Main.main4
                Main.main3
                GHC.Prim.void#
        of ...
      ```
      The problem was that GHC apparently couldn't tell that
      `readRawBufferPtr` would always demand the buffer. Here we simple add
      bang patterns on all of the small arguments of these functions to ensure
      that worker/wrappers can eliminate these allocations.
      
      Test Plan: Look at STG produced by testcase in #9696, verify no
      allocations
      
      Reviewers: austin, hvr, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: RyanGlScott, simonmar, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2813
      
      GHC Trac Issues: #9696
      cc2e3ec0
  13. 29 Nov, 2016 1 commit
  14. 18 Nov, 2016 1 commit
  15. 17 Nov, 2016 2 commits
  16. 14 Oct, 2016 1 commit
    • Ryan Scott's avatar
      Add missing Semigroup instances for Monoidal datatypes in base · 8c6a3d68
      Ryan Scott authored
      Summary:
      There are currently three datatypes that are exposed in `base` that have
      `Monoid` instances, but no `Semigroup` instances:
      
      * `IO`
      * `Event` (from `GHC.Event`)
      * `Lifetime` (from `GHC.Event`)
      
      (There is also `EventLifetime` in `GHC.Event.Internal`, but it is not exported
      directly, so I didn't bother with it.)
      
      Adding the `Semigroup` instances for these types directly in the modules in
      which they're defined resulted in some horrific import cycles, so I opted to
      take the easy approach of defining all of these instances in `Data.Semigroup`.
      (When `Semigroup` becomes a superclass of `Monoid`, these instances will have
      to be moved somehow.)
      
      Fixes #12464.
      
      Test Plan: It compiles
      
      Reviewers: hvr, ekmett, austin, bgamari
      
      Reviewed By: ekmett
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2588
      
      GHC Trac Issues: #12464
      8c6a3d68
  17. 31 Aug, 2016 1 commit
    • Ryan Scott's avatar
      Add Read1/Read2 methods defined in terms of ReadPrec · 9cfef167
      Ryan Scott authored
      This adds new methods `liftReadList(2)` and `liftReadListPrec(2)` to the
      `Read1`/`Read2` classes which are defined in terms of `ReadPrec` instead
      of `ReadS`. This also adds related combinators and changes existing
      `Read1` and `Read2` instances to be defined in terms of the new methods.
      
      Reviewers: hvr, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2379
      
      GHC Trac Issues: #12358
      9cfef167
  18. 18 Aug, 2016 1 commit
  19. 20 Jul, 2016 1 commit
  20. 14 Jul, 2016 1 commit
  21. 04 Jul, 2016 1 commit
  22. 18 Jun, 2016 1 commit
    • Ryan Scott's avatar
      Add Bifoldable and Bitraversable to base · 270d545d
      Ryan Scott authored
      This adds `Data.Bifoldable` and `Data.Bitraversable` from the
      `bifunctors` package to `base`, completing the migration started in
      D336.  This is fairly straightforward, although there were a suprising
      amount of reinternal organization in `base` that was needed for this to
      happen:
      
      * `Data.Foldable`, `Data.Traversable`, `Data.Bifoldable`, and
        `Data.Bitraversable` share some nonexported datatypes (e.g., `StateL`,
        `StateR`, `Min`, `Max`, etc.) to implement some instances. To avoid
        code duplication, I migrated this internal code to a new hidden
        module, `Data.Functor.Utils` (better naming suggestions welcome).
      
      * `Data.Traversable` and `Data.Bitraversable` also make use of an
        identity newtype, so I modified them to use
        `Data.Functor.Identity.Identity`. This has a ripple effect on several
        other modules, since I had to move instances around in order to avoid
        dependency cycles.
      
      Fixes #10448.
      
      Reviewers: ekmett, hvr, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2284
      
      GHC Trac Issues: #9682, #10448
      270d545d
  23. 12 May, 2016 1 commit
    • Ryan Scott's avatar
      Make Generic1 poly-kinded · b8e25651
      Ryan Scott authored
      This generalizes the `Generic1` typeclass to be of kind `k -> *`, and
      this also makes the relevant datatypes and typeclasses in `GHC.Generics`
      poly-kinded. If `PolyKinds` is enabled, `DeriveGeneric` derives
      `Generic1` instances such that they use the most general kind possible.
      Otherwise, deriving `Generic1` defaults to make an instance where the
      argument is of kind `* -> *` (the current behavior).
      
      Fixes #10604. Depends on D2117.
      
      Test Plan: ./validate
      
      Reviewers: kosmikus, dreixel, goldfire, austin, hvr, simonpj, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie, ekmett
      
      Differential Revision: https://phabricator.haskell.org/D2168
      
      GHC Trac Issues: #10604
      b8e25651
  24. 02 May, 2016 1 commit
    • Facundo Domínguez's avatar
      StaticPointers: Allow closed vars in the static form. · 36d29f7c
      Facundo Domínguez authored
      Summary:
      With this patch closed variables are allowed regardless of whether
      they are bound at the top level or not.
      
      The FloatOut pass is always performed. When optimizations are
      disabled, only expressions that go to the top level are floated.
      Thus, the applications of the StaticPtr data constructor are always
      floated.
      
      The CoreTidy pass makes sure the floated applications appear in the
      symbol table of object files. It also collects the floated bindings
      and inserts them in the static pointer table.
      
      The renamer does not check anymore if free variables appearing in the
      static form are top-level. Instead, the typechecker looks at the
      tct_closed flag to decide if the free variables are closed.
      
      The linter checks that applications of StaticPtr only occur at the
      top of top-level bindings after the FloatOut pass.
      
      The field spInfoName of StaticPtrInfo has been removed. It used to
      contain the name of the top-level binding that contains the StaticPtr
      application. However, this information is no longer available when the
      StaticPtr is constructed, as the binding name is determined now by the
      FloatOut pass.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, simonpj, austin, hvr, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: thomie, mpickering, mboes
      
      Differential Revision: https://phabricator.haskell.org/D2104
      
      GHC Trac Issues: #11656
      36d29f7c
  25. 01 May, 2016 1 commit
    • Ryan Scott's avatar
      Export constructors for IntPtr and WordPtr · a28611b1
      Ryan Scott authored
      This finishes what #5529 started by exporting the constructors for
      `IntPtr` and `WordPtr` from `Foreign.Ptr`, allowing them to be used in
      `foreign` declarations.
      
      Fixes #11983.
      
      Test Plan: `make TEST=T11983`
      
      Reviewers: simonpj, hvr, bgamari, austin
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2142
      
      GHC Trac Issues: #11983
      a28611b1
  26. 11 Apr, 2016 1 commit
    • duairc's avatar
      Added (more) missing instances for Identity and Const · 8b57cac5
      duairc authored
        * `Identity` and `Const` now have `Num`, `Real`, `Integral`,
          `Fractional`, `Floating`, `RealFrac` and `RealFloat` instances
      
        * `Identity` and `Const` now have `Bits` and `FiniteBits` instances
      
        * `Identity` and `Const` now have `IsString` instances
      
      Reviewers: RyanGlScott, austin, hvr, bgamari, ekmett
      
      Reviewed By: ekmett
      
      Subscribers: nomeata, ekmett, RyanGlScott, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2079
      
      GHC Trac Issues: #11790
      8b57cac5
  27. 29 Mar, 2016 1 commit
  28. 29 Feb, 2016 1 commit
    • Ryan Scott's avatar
      Missing Proxy instances, make U1 instance more Proxy-like · 171d95df
      Ryan Scott authored
      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
      171d95df
  29. 25 Feb, 2016 1 commit
    • Ryan Scott's avatar
      Add more type class instances for GHC.Generics · 673efccb
      Ryan Scott authored
      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
      673efccb
  30. 12 Feb, 2016 1 commit
    • Ryan Scott's avatar
      Add IsList instance for CallStack, restore Show instance for CallStack · be3d7f66
      Ryan Scott authored
      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
      be3d7f66
  31. 02 Feb, 2016 1 commit
    • Ryan Scott's avatar
      Make TypeError a newtype, add changelog entry · a7ad0b91
      Ryan Scott authored
      Summary:
      Phab:D866 added the `TypeError` datatype to `Control.Exception` to represent
      the error that is thrown when `-fdefer-type-errors` is on, but a changelog
      entry for it was never added. In addition, it should probably be a
      newtype.
      
      Reviewers: austin, hvr, KaneTW, bgamari
      
      Reviewed By: KaneTW, bgamari
      
      Subscribers: thomie, KaneTW
      
      Differential Revision: https://phabricator.haskell.org/D1873
      
      GHC Trac Issues: #10284
      a7ad0b91
  32. 23 Dec, 2015 1 commit
    • Eric Seidel's avatar
      Allow CallStacks to be frozen · 380b25ea
      Eric Seidel authored
      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
  33. 21 Dec, 2015 6 commits
    • Ben Gamari's avatar
      base: Add sections to changelog · fb3302c9
      Ben Gamari authored
      fb3302c9
    • duairc's avatar
      Added missing instances for Identity and Const (#11210) · 2dff6c18
      duairc authored
      The following instances are added
      
          instance Bounded a => Bounded (Const a b)
          instance Enum a => Enum (Const a b)
          instance Ix a => Ix (Const a b)
          instance Storable a => Storable (Const a b)
      
          instance Bounded a => Bounded (Identity a)
          instance Enum a => Enum (Identity a)
          instance Ix a => Ix (Identity a)
          instance Semigroup a => Semigroup (Identity a)
          instance Storable a => Storable (Identity a)
      
      Reviewers: ekmett, RyanGlScott, rwbarton, hvr, austin, bgamari
      
      Reviewed By: RyanGlScott, hvr
      
      Subscribers: rwbarton, RyanGlScott, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1626
      
      GHC Trac Issues: #11210
      2dff6c18
    • Ryan Scott's avatar
      Encode strictness in GHC generics metadata · ee6fba89
      Ryan Scott authored
      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
      - 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
    • duairc's avatar
      Move Const to own module in Data.Functor.Const and enable PolyKinds · edcf17bd
      duairc authored
      `Const` from `Control.Applicative` can trivially be made
      kind-polymorphic in its second argument. There has been a Trac issue
      about this for nearly a year now. It doesn't look like anybody objects
      to it, so I figured I might as well make a patch.
      
      Trac Issues: #10039, #10865, #11135
      
      Differential Revision: https://phabricator.haskell.org/D1630
      
      Reviewers: ekmett, hvr, bgamari
      
      Subscribers: RyanGlScott, thomie
      edcf17bd
    • dolio's avatar
      Modify IsString String instance (fixes #10814) · b225b234
      dolio authored
      The new instance resolves to `s ~ [Char]` as soon as we know that `s ~
      [a]`, to avoid certain functions (like (++)) causing a situation where
      `a` is ambiguous and (currently) unable to be defaulted.
      
      Reviewers: #core_libraries_committee, hvr, austin, bgamari
      
      Reviewed By: hvr, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1572
      
      GHC Trac Issues: #10814
      b225b234