Use do_something_with_foo 99L
.
The constant 99
has type int
, 99L
has type int64
.
This has nothing to do with the type alias foo_t = int64
. As long as the definition of foo_t
is visible (i.e. not masked by the signature of a containing module), any value of type int64
also has type foo_t
and vice-versa.