GHC 2021

Motivation

The GHC20xx process proposal motivates why we feel the need for GHC20xx extensions in general.

GHC2021 is the first iteration of this process, which makes it a bit special: It is large, as it includes all the obvious, low-hanging fruit. And because it introduces the concept to our users, it heavily influences acceptance and adoption of the whole idea. Therefore, this iteration is on the slightly conservative side, excluding some extensions that almost made it.

Proposed Change

The GHC2021 language extension set comprises of the following language extensions, relative to Haskell2010:

As a reminder, the following extensions are part of Haskell2010, and continue to be enabled:

The following deprecated extensions, which are part of Haskell2010, are _not_ included in GHC2021:

The GHC2021 language set works analogously to the existing Haskell98 and Haskell2010 language set. In particular, there is no -XNoGHC2021.

Data

The following table contains the information that was gathered to help the committee decide, based on an analysis of hackage and a community poll, as well as the tallied votes. At a committe size of 11, 8 votes are necessary to include an extension in GHC2021:

The columns are:

  • Since: First version that ships this extension

    Some Extension may have had serious changes since then.

  • Proliferation: #(packages using that extensions)/#(packages parsed)

  • Innocuousness: #(packages enable it in .cabal)/#(packages using default-extensions)

    A high number here indicates that many developers want this on by default in their project, across all modules.

  • Aloofness: #(packages using this, but _only_ in modules, despite using default-extensions) /#(packages using default-extensions)

    A high number here indicates that, although a developer was in principle happy with putting extensions into the default-extensions field, they did not include this particular one. I take this as an indication that this extension does _not_ make a great on-by-default extension. (Matching my expectation, TemplateHaskell and CPP make the highest here)

  • Popularity: #(users who want this)/#(users who filled out the poll)

  • Contentionsness: #(users who don’t want this)/#(users who want this)

  • Votes: #(committee members in favor)/#(commitee members already votes)

    Once all votes are in, 66.6% here indicate that the extension would be accepted.

The raw data (input and aggregated) is found at https://github.com/nomeata/ghc-proposals-stats/blob/master/ext-stats/GHC2021 and the steps to produce them are noted in https://github.com/nomeata/ghc-proposals-stats/blob/master/ext-stats/README.md. This contains an easy setup to load the data into GHCI to play around with ist (custom sorting, etc.)

Caveats:

  • The hackage data is based on the the latest version of each hackage package. This skews heavily towards libraries, which are more likely to be found on Hackage than executable. It also puts higher weight on projects that are split into many haskell packages (e.g. amazonka).

  • The poll data has no serious protection aginst double voting, and skews heavily towards the part of the community that is reached by the poll announcemnt.

Data based on 13951 hackage packages, 1348 survey responses and 11 committee votes. (Votes may be changed. Bold votes are currently above 2/3.)

Extension

Votes

AM

AS

CC

ES

ID

JB

RE

SJ

SM

TH

VB

Since

Pop…

Cont…

Prolif…

Innoc…

Aloof…

BangPatterns

11

6.8.1

35%

9%

13%

22%

7%

BinaryLiterals

11

7.10.1

17%

23%

1%

3%

0

ConstraintKinds

11

7.4.1

21%

19%

9%

27%

7%

DeriveDataTypeable

11

6.8.1

21%

16%

19%

23%

8%

DeriveFoldable

11

7.10.1

32%

9%

5%

19%

2%

DeriveFunctor

11

7.10.1

36%

8%

9%

25%

6%

DeriveGeneric

11

7.2.1

38%

7%

17%

29%

12%

DeriveTraversable

11

7.10.1

29%

10%

5%

19%

3%

EmptyCase

11

7.8.1

18%

20%

1%

5%

1%

EmptyDataDecls

11

6.8.1

8%

4%

0

14%

0

ExplicitForAll

11

6.12.1

18%

27%

1%

1%

1%

FlexibleContexts

11

6.8.1

29%

13%

29%

45%

14%

FlexibleInstances

11

6.8.1

29%

13%

33%

46%

16%

GADTSyntax

11

7.2.1

18%

24%

0%

0%

0

HexFloatLiterals

11

8.4.1

9%

52%

0%

0

0

KindSignatures

11

6.8.1

24%

12%

7%

12%

4%

MultiParamTypeClasses

11

6.8.1

27%

11%

23%

37%

11%

StandaloneDeriving

11

6.8.1

22%

12%

10%

26%

6%

ConstrainedClassMethods

10

6.8.1

4%

138%

0%

0%

0%

EmptyDataDeriving

10

8.4.1

0

N/A

0%

0

0%

Extension

Votes

AM

AS

CC

ES

ID

JB

RE

SJ

SM

TH

VB

Since

Pop…

Cont…

Prolif…

Innoc…

Aloof…

ImportQualifiedPost

10

8.10.1

4%

70%

0

0

0

InstanceSigs

10

7.6.1

19%

16%

3%

11%

2%

NumericUnderscores

10

8.6.1

18%

15%

0%

0%

0%

PostfixOperators

10

7.10.1

3%

229%

0%

0%

0%

RankNTypes

10

6.8.1

39%

22%

21%

31%

12%

StarIsType

10

8.6.1

0

N/A

0

0%

0

TypeApplications

10

8.0.1

29%

11%

6%

14%

5%

DeriveLift

9

8.0.1

19%

19%

1%

2%

0%

ForeignFunctionInterface

9

6.8.1

3%

211%

0

4%

0

GeneralisedNewtypeDeriving

9

6.8.1

28%

12%

19%

31%

14%

NamedFieldPuns

9

6.10.1

18%

24%

5%

10%

3%

PolyKinds

9

7.4.1

11%

41%

5%

11%

4%

StandaloneKindSignatures

9

8.10.1

8%

28%

0%

0

0%

TypeSynonymInstances

9

6.8.1

7%

74%

10%

8%

7%

ExistentialQuantification

8

6.8.1

15%

30%

7%

7%

6%

MonadFailDesugaring

8

8.0.1

7%

15%

0%

2%

0

NamedWildCards

8

7.10.1

8%

65%

0%

1%

0

ScopedTypeVariables

8

6.8.1

33%

8%

29%

41%

14%

TupleSections

8

6.12

27%

12%

10%

27%

7%

TypeOperators

8

6.8.1

20%

17%

14%

28%

6%

Extension

Votes

AM

AS

CC

ES

ID

JB

RE

SJ

SM

TH

VB

Since

Pop…

Cont…

Prolif…

Innoc…

Aloof…

DerivingStrategies

7

8.2.1

27%

11%

1%

3%

1%

GADTs

7

6.8.1

34%

13%

13%

25%

8%

MonoLocalBinds

7

6.12.1

2%

279%

1%

1%

1%

OverloadedStrings

7

6.8.1

45%

12%

37%

53%

12%

RecordWildCards

7

6.8.1

16%

39%

17%

28%

9%

TypeFamilies

7

6.8.1

24%

18%

23%

33%

11%

DataKinds

6

7.4.1

26%

21%

13%

28%

8%

LambdaCase

6

7.6.1

46%

6%

14%

34%

5%

NegativeLiterals

6

7.8.1

7%

58%

0%

2%

0%

UnicodeSyntax

6

6.8.1

7%

99%

2%

7%

0%

DefaultSignatures

5

7.2.1

16%

26%

6%

19%

4%

DerivingVia

5

8.6.1

30%

10%

0%

1%

1%

FunctionalDependencies

5

6.8.1

17%

27%

9%

22%

6%

NoMonomorphismRestriction

5

6.8.1

4%

131%

4%

11%

3%

NumDecimals

5

7.8.1

4%

107%

0%

1%

0%

RoleAnnotations

5

7.8.1

6%

75%

1%

1%

1%

ViewPatterns

5

6.10.1

20%

22%

7%

10%

6%

ExplicitNamespaces

4

7.6.1

4%

138%

1%

0%

1%

NullaryTypeClasses

4

7.8.1

3%

145%

0%

0

0

OverloadedLists

4

7.8.1

10%

81%

1%

1%

2%

Extension

Votes

AM

AS

CC

ES

ID

JB

RE

SJ

SM

TH

VB

Since

Pop…

Cont…

Prolif…

Innoc…

Aloof…

ParallelListComp

4

6.8.1

4%

175%

1%

9%

0%

UnliftedNewtypes

4

8.10.1

3%

121%

0%

0

0

BlockArguments

3

8.6.1

12%

63%

0%

2%

0%

DisambiguateRecordFields

3

6.8.1

6%

105%

0%

1%

0%

LexicalNegation

3

9.0.1

0

N/A

0

0

0

LiberalTypeSynonyms

3

6.8.1

5%

105%

1%

9%

0%

MultiWayIf

3

7.6.1

22%

20%

4%

17%

2%

RecursiveDo

3

6.8.1

5%

135%

1%

2%

1%

TypeFamilyDependencies

3

8.0.1

9%

59%

1%

2%

1%

NondecreasingIndentation

2

?

0

N/A

0%

1%

0%

PartialTypeSignatures

2

7.10.1

7%

84%

1%

6%

1%

PatternSynonyms

2

7.8.1

14%

24%

3%

6%

4%

TemplateHaskellQuotes

2

8.0.1

2%

446%

0%

0%

0%

ApplicativeDo

1

8.0.1

14%

65%

1%

2%

1%

Arrows

1

6.8.1

4%

284%

2%

9%

0%

CApiFFI

1

7.10.1

2%

404%

0%

0%

0%

DuplicateRecordFields

1

8.0.1

11%

63%

1%

4%

2%

MagicHash

1

6.8.1

4%

160%

4%

9%

2%

PackageImports

1

6.10.1

6%

96%

2%

3%

1%

QuantifiedConstraints

1

8.6.1

7%

74%

0%

1%

1%

Extension

Votes

AM

AS

CC

ES

ID

JB

RE

SJ

SM

TH

VB

Since

Pop…

Cont…

Prolif…

Innoc…

Aloof…

QuasiQuotes

1

6.10.1

6%

121%

7%

14%

7%

TemplateHaskell

1

6.0

6%

176%

18%

19%

17%

TypeInType

1

8.0.1

6%

95%

1%

1%

1%

UnboxedSums

1

8.2.1

4%

140%

0%

0

0%

UnboxedTuples

1

6.8.1

5%

134%

3%

8%

1%

UnliftedFFITypes

1

6.8.1

0

N/A

0%

0%

0%

AllowAmbiguousTypes

0

7.8.1

4%

348%

3%

3%

4%

CPP

0

6.8.1

2%

640%

23%

10%

20%

CUSKs

0

8.10.1

0

N/A

0%

0

0%

DatatypeContexts

0

7.0.1

2%

411%

0

0

0

DeriveAnyClass

0

7.10.1

17%

43%

3%

2%

5%

ExtendedDefaultRules

0

6.8.1

1%

544%

1%

0%

1%

GHCForeignImportPrim

0

6.12.1

0

N/A

0%

0

0%

ImplicitParams

0

6.8.1

1%

817%

1%

1%

1%

ImpredicativeTypes

0

6.10.1

1%

645%

1%

1%

1%

IncoherentInstances

0

6.8.1

1%

2514%

1%

0%

1%

InterruptibleFFI

0

7.2.1

1%

643%

0%

0

0%

LinearTypes

0

9.0.1

0

N/A

0

0

0

MonadComprehensions

0

7.2.1

5%

167%

0%

3%

0%

NPlusKPatterns

0

6.12.1

1%

1023%

0

0

0

Extension

Votes

AM

AS

CC

ES

ID

JB

RE

SJ

SM

TH

VB

Since

Pop…

Cont…

Prolif…

Innoc…

Aloof…

NoImplicitPrelude

0

6.8.1

7%

128%

8%

30%

2%

NoPatternGuards

0

6.8.1

0%

3600%

0

0

0

NoTraditionalRecordSyntax

0

7.4.1

1%

1243%

0

0

0

OverlappingInstances

0

?

2%

514%

2%

0%

2%

OverloadedLabels

0

8.0.1

8%

89%

1%

2%

0%

QualifiedDo

0

9.0.1

0

N/A

0

0

0

RebindableSyntax

0

7.0.1

1%

788%

1%

1%

1%

Safe

0

7.2.1

0

N/A

0

0

0

StaticPointers

0

7.10.1

1%

654%

0%

0

0%

Strict

0

8.0.1

1%

805%

0%

1%

0%

StrictData

0

8.0.1

4%

256%

1%

3%

1%

TransformListComp

0

6.10.1

1%

731%

0%

0

0

Trustworthy

0

7.2.1

0%

2180%

0

0

0

UndecidableInstances

0

?

3%

411%

14%

7%

16%

UndecidableSuperClasses

0

8.0.1

1%

1675%

1%

0%

1%

Unsafe

0

7.4.1

0%

3475%

0

0

0