Could someone tell me how to implement the following function in ATS:
fun int2double (x: int): double
Thanks!
It depends on the target language you want to compile to.
If you compile to C, you can just do:
staload
UN = "prelude/SATS/unsafe.sats"
fun int2double(x: int): double = $UN.cast(x)
If you compile to JavaScript, then int2double is already defined.