Unfortunately, this is not currently supported in ATS.
You need to go through C in order to create a value of type suite(a, n):
%{^
typedef
struct {
void *name,
void *setup,
void *teardown,
void *tests[0]
} suite;
%}
typedef
suite(data:t0ype,n:int) =
$extype_struct "suite" of {
I'd like to write something like the following code:
#include "share/atspre_staload.hats"
#include "share/atspre_define.hats"
typedef test = () -> int(* better type later *)
typedef suite(data:t0ype,n:int) = @{
name = string,
setup = (data -> void),
teardown = (data -> void),