georgefst / Haskell-breaking-changes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This document describes a list of upcoming/proposed changes to Haskell core/de facto libraries.

Upcoming: Remove Control.Monad.Trans.List

Upcoming: Remove Control.Monad.Trans.Error

Upcoming: Monomorphise Data.List

Planned: remove return from Monad

Planned: remove mappend from Monoid

  • Summary: return gets removed from the Monad class and becomes a top-level function defined as mappend = (<>)
  • Proposal: GHC wiki: semigroup-monoid, related: Enable -Wnoncanonical-monad-instances and -Wnoncanonical-monoid-instances by default
  • ETA: Unknown
  • Tracking issue: N/A
  • Merge request: N/A
  • Expected breakage: major (without an update to the warning)
  • Relevant warnings: -Wnoncanonical-monoid-instances (enabled by default as of GHC 9.2)
  • How to fix: Remove definitions of mappend (compatible up to GHC 8.4)
  • TODO: make -Wnoncanonical-monoid-instances warn manual declarations of mappend

Planned: remove (/=) from the the Eq class

  • Summary: (/=) gets removed from the Eq class and becomes a top-level function defined as a /= b = not (a == b)
  • Proposal: haskell/core-libraries-committee#3
  • ETA: Unknown
  • Tracking issue: N/A
  • Merge request: N/A
  • Expected breakage: 131 packages according to the proposal
  • How to fix: Remove definitions of (/=) (backward-compatible)

Planned: disable StarIsType by default

  • Summary: * will no longer be parsed as a kind of value types (Type).
  • Proposal: ghc-proposals/ghc-proposals#143
  • ETA: Unknown
  • Tracking issue: N/A
  • Merge request: N/A
  • Expected breakage: medium
  • Relevant warnings: -Wstar-is-type
  • How to fix: Replace * with Type (from Data.Kind)

See also

About