Skip to content

Make arithmetic extensible #3

@adituv

Description

@adituv

This may not be possible directly.

When I attempted this before by making type families open, all existing code worked in GHC >= 8.2, but a new module attempting to extend arithmetic with a type representing positive infinity failed to resolve AddK Nat InfiniteK to InfiniteK. There might be a way to do this still but so far it looks like a closed type family is required for the result kind of another type family.

Previous attempt: https://github.com/adituv/typenums/blob/open-type-families/src/Test.hs

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions