Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert vector pattern "fixes" #966

Merged
merged 1 commit into from Dec 13, 2019
Merged

Revert vector pattern "fixes" #966

merged 1 commit into from Dec 13, 2019

Conversation

martijnbastiaan
Copy link
Member

This reverts commits:

We found too many issues with exporting the "real" vector constructor:

  1. While it improves type inference in some cases (see issue View pattern definition of :> doesn't play nicely with typechecker #867), it
    worsens it in others. (See testsuite changes in Remove :> pattern, rename Cons to :> #943.)

  2. GADT don't permit lazy patterns, which seems to be widely used in
    existing code bases.

  3. Using the Vec constructor can trigger a bug in GHC stochastically
    making compilation super slow. Having it as a default is therefore
    not ideal for now.

This reverts commits:

  * 338558a
  * e6872e9
  * d7f4e48
  * 1b1d03c
  * 0db9192
  * bf453ae
  * 060ce16

We found too many issues with exporting the "real" vector constructor:

  1. While it improves type inference in some cases (see issue #867), it
  worsens it in others. (See testsuite changes in #943.)

  2. GADT don't permit lazy patterns, which seems to be widely used in
  existing code bases.

  3. Using the Vec constructor can trigger a bug in GHC stochastically
  making compilation _super_ slow. Having it as a default is therefore
  not ideal for now.
@leonschoorl
Copy link
Member

We are exporting also exporting the real vector constructor Cons.
And thanks to the GADT support, code using it is now synthesizable.
So user can use both Cons and :>.
Only when deconstructing Vec's, they have different "type-inferenceability".
:> is usually more convenient.
But if you want to write thing like in #867 you must use Cons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants