Skip to content

Change Lens type from Tuple to a record/union #58

@LAJW

Description

@LAJW

A great package, I'm enjoying it thoroughly, with the exception of compile errors.

It quite often happens the type checker substitutes the type alias for the actual type (espcially in the case of an inferred type and especially in the case of an error) and produces errors more difficult to parse than they would be if the lens was stored not as a tuple but rather a record:

expected: Lens<MyRecord, int>
vs
expected: (MyRecord -> int) * (int -> MyRecord -> MyRecord)

Which needless to say gets worse with the complication of either of the types involved.

Would this be something you'd be willing to consider changing or is it too compatibility breaking to be worth thinking about?

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