Typed Racket won't generate type-dispatching code for you
automatically. However, if you write such code the same way you'd
write it in regular Racket, Typed Racket will be ok with that. For
example,
#lang typed/racket
(: id : (case-> (One One -> Number)
((Immutable-Vectorof One)
Thanks for the advice, Jay.
I installed dynamic-ffi and could not get the initial example to work,
presumably due to my own error:
https://github.com/dbenoit17/dynamic-ffi/issues/25
~slg
‐‐‐ Original Message ‐‐‐
On Wednesday, October 9, 2019 6:36 PM, Jay McCarthy
wrote:
> Hi Sage,
>
Hi,
I am trying to write an APL compiler (a typed J implementation) with a
typed racket backend. APLs have first-class functions that apply to both
scalars and arrays, so there are 2 cases for functions of 2 arguments:
- the *array -- array* case
- the *scalar -- scalar* case
*Scalar --
3 matches
Mail list logo