Visitar URL original
Backport new instances introduced in GHC 8.0 · Issue #32 · haskell-compat/base-orphans · GitHub
Skip to content

Backport new instances introduced in GHC 8.0 #32

Closed

Description

@RyanGlScott

Historically, several new instances that were introduced in later versions of GHC weren't well publicized, causing me to have to hunt them down myself later, a very tedious process. The GHC devs have been much better about this recently, but just in case, I'll document what needs to be backported once GHC 8.0.1-rc1 is released.

I created this initial list based off of the base changelog here, so this may not be comprehensive. If there's something missing, please tell me so that I can get them all in one go (hopefully)!

New instances

  • Applicative instances
    • Data.Complex (base-4.4 and later only)
      • Complex
    • Data.Monoid
      • Dual
      • Product
      • Sum
  • Bounded instances
    • Control.Applicative
      • Const
    • Data.Functor.Identity (base-4.8 only)
      • Identity
  • Data instances
    • Data.Monoid
      • All
      • Alt
      • Any
      • Dual
      • First
      • Last
      • Product
      • Sum
  • Enum instances
    • Control.Applicative
      • Const
    • Data.Functor.Identity (base-4.8 only)
      • Identity
  • Foldable instances
    • Control.Applicative
      • ZipList
    • Data.Complex (base-4.4 and later only)
      • Complex
    • Data.Monoid
      • Dual
      • First
      • Last
      • Product
      • Sum
  • Functor instances
    • Data.Complex (base-4.4 and later only)
      • Complex
    • Data.Monoid
      • Dual
      • Product
      • Sum
  • Generic instances (Done)
    • Data.Complex (base-4.4 and later only)
      • Complex
    • Data.Version
      • Version
    • System.Exit
      • ExitCode
  • Generic1 instances (Done)
    • Data.Complex (base-4.4 and later only)
      • Complex
    • Data.Proxy (base-4.7 and later only)
      • Proxy
  • Ix instances
    • Control.Applicative
      • Const
    • Data.Functor.Identity (base-4.8 only)
      • Identity
  • Monad instances
    • Data.Complex (base-4.4 and later only)
      • Complex
    • Data.Monoid
      • Dual
      • Product
      • Sum
    • Data.Tuple
      • (,)
  • MonadFix instances
    • Data.Monoid
      • Alt
      • Dual
      • First
      • Last
      • Product
      • Sum
  • MonadZip instances
    • Data.Maybe
      • Maybe
    • Data.Monoid
      • Alt
      • Dual
      • First
      • Last
      • Product
      • Sum
  • Monoid instances
    • Data.Functor.Identity
      • Identity
    • System.IO
      • IO
  • Storable instances
    • Control.Applicative
      • Const
    • Data.Functor.Identity (base-4.8 only)
      • Identity
    • Data.Tuple
      • ()
  • Traversable instances
    • Control.Applicative
      • ZipList
    • Data.Complex (base-4.4 and later only)
      • Complex
    • Data.Monoid
      • Dual
      • First
      • Last
      • Product
      • Sum

Other TODOs

  • The Monoid instance for Identity needs to be backported to transformers Done.
  • The Semigroup instance for Identity needs to be backported to transformers Done
  • We should not add the upcoming MonadPlus IO and Alternative IO instances to base-orphans, as they are provided via Control.Monad.Trans.Error in transformers because of unfortunate historical reasons. We should add a note in the README about this.
  • The new Functor instances readily admit Distributive, Representable, and Adjunction instances.
  • Note in the README that semigroups and transformers backport some things added in GHC 8.0

Activity

  1. added a commit that references this issue on Jan 14, 2016
    a44bb3a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions