You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I understand correctly, the situation is the following. To define new domains, we sometimes have to define new primitives in ocaml, which means we have to define their types. However, we can't use ocaml's typing system directly, but rather we have to define types with dreamcoder's typing system. Dreamcoder's types (in ocaml) are objects of type tp. Tp is a sum type, with two kinds of elements, TID (for type variables) and TCon (for all other types). Each TCon object then is a tuple with three elements:
The name of the primitive
A (possibly empty) list of the types of the arguments to that primitive
A boolean, specifying recursively whether any of the arguments is a type variable
If I understand correctly, the situation is the following. To define new domains, we sometimes have to define new primitives in ocaml, which means we have to define their types. However, we can't use ocaml's typing system directly, but rather we have to define types with dreamcoder's typing system. Dreamcoder's types (in ocaml) are objects of type
tp
. Tp is a sum type, with two kinds of elements, TID (for type variables) and TCon (for all other types). Each TCon object then is a tuple with three elements:For instance, the tlist type is defined as
and the type of a function from int to int is defined as
What I am wondering is whether it would be possible to implement a tuple type, e.g. as:
and how would we use it to construct primitives and how it would interface with python primitives.
The text was updated successfully, but these errors were encountered: