Skip to content

Why is Data.Vector.Generic.New.New not a newtype? #453

Description

@konsumlamm

The New type in Data.Vector.Generic.New is currently defined as

data New v a = New (forall s. ST s (Mutable v s a))

Is there any reason this isn't a newtype?

Activity

  1. konsumlamm commented on Feb 14, 2023

    @konsumlamm
    ContributorAuthor

    Apprently it was a newtype originally, but it was changed in 82fe1c9, although without explanation.

  2. lehins commented on Feb 14, 2023

    @lehins
    Contributor

    @konsumlamm It must be a data type instead of newtype otherwise the rewrite rules will not fire. I can try add a comment later on to the definition with explanation why it must be a data type. I'll keep this ticket around to track this task of explaining in the code.

  3. changed the title [-]Make `Data.Vector.Generic.New.New` a newtype[/-] [+]Why is `Data.Vector.Generic.New.New` not a newtype?[/+] on Feb 14, 2023
  4. added 3 commits that reference this issue on Sep 2, 2023
    685195a
    197ddf6
    c939197
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