-
Notifications
You must be signed in to change notification settings - Fork 61
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
(Complex Single-Float) should have a repr CL::(COMPLEX SINGLE-FLOAT) #1008
Comments
How easy or difficult would it be to make (in-package :coalton-user)
(coalton-toplevel
(repr :native (or cl:number (cl:complex *)))
(define-type (complx :a)))
(coalton-toplevel
(repr :native (cl:complex single-float))
(define-type complx/single-float)
(specialize complx complx/single-float (complx single-float))) Currently, the above results in an error that |
@digikar99 I think we can have something similar-ish, where at the definition of |
Yup, this looks good! On a sidenote, I wonder if coalton should have tagged versions, and/or separate main and dev branches to avoid breaking things for coalton users. |
Eventually we'll tag versions when things sort of converge. We know we can't keep breaking things forever. |
The current implementation is not wrong, but the
repr
is(COMMON-LISP:OR COMMON-LISP:NUMBER C:COMPLEX)
, which means any sort of (Lisp) compiler optimization is hosed. This is basically the same issue as specialized arrays, but doesn't deserve as much ceremony as specialized arrays, and there are only two specialized types worth caring about: singles and doubles. We should work to make Coalton emit these specialized types.The text was updated successfully, but these errors were encountered: