Skip to content

Simplify tuple type Type *: EmptyTuple #5

@marcelluethi

Description

@marcelluethi

When tuples are redued to a Tuple1, the type inferred shows Type *: EmptyTuple.type.
This looks rather ugly in the type signature and may confuse the reader of the code.

One possible solution is to add a typlevel function Simplify

 type Simplify[T <: Tuple] <: Tuple = T match
    case h *: EmptyTuple => Tuple1[h]
    case _ => T

This function could be added to the typelevel computations to simplify the computed type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions