Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macros for defining new signed and unsigned byte types #1324

Closed
wants to merge 1 commit into from

Conversation

Izaakwltn
Copy link
Collaborator

These macros have proven useful when handling specific byte sizes.

COALTON-LIBRARY/MATH/DEFINE-BYTE-TYPES> (define-unsigned-byte-type 20)
; No value
COALTON-LIBRARY/MATH/DEFINE-BYTE-TYPES> (coalton (the U20 265))
265
COALTON-LIBRARY/MATH/DEFINE-BYTE-TYPES> (define-signed-byte-type 25)
; No value
COALTON-LIBRARY/MATH/DEFINE-BYTE-TYPES> (coalton (the I25 265))
265

The class instances included are:
(Into Integer), Eq, Ord, Num, Bits, Default, Hash, Integral.

@Izaakwltn Izaakwltn marked this pull request as draft November 12, 2024 06:19
@Izaakwltn Izaakwltn closed this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant