Skip to content

Is HList really needed? Or does Vec suffice #8

Description

@BlastWind

An HList keeps track of two things:

  • The types of the heterogeneous elements in a list
  • Implicitly, the length of the list. I.e., you can write a HLength type family pretty easily

But do we really need an HList? In our codebase, we always use HReplicateR to create HLists, which suggests that we really just have a homogeneous list. Additionally, I made cursor read through hasktorch, and AI thinks all HLists in the repo are homogeneous.

If the lists are just homogeneous, let's just use a Vec instead (which keeps track of length dependently still).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions