Skip to content

Use Int for capacity in TBQueue interface again? #74

@konsumlamm

Description

@konsumlamm

In #17 / 2221948, the type for the capacity of TBQueues was changed from Int to Natural, to avoid negative capacities. With #70, the capacity is now internally stored as an Int (since array lengths are Ints), so IMO it would make sense to change the public API back to Ints. Moreover, we need to check that the capacity is greater than 0 anyway and currently we additionally have to check that the capacity is not greater than maxBound :: Word. This would also avoid potentially having to unbox/box Naturals.

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