steps to reproduce:
save the file and try to compile it with `hare build`
```
export type foo = struct {
bar: int
};
export def FOO = foo { bar = 0 };
```
it triggers a TODO (src/typedef.c:172) that I would like to fix. I'm
just not sure what's actually happening in this specific function. as
far as I could guess, it produces the exported definitions of types and
any exported object that uses these types.
what exactly should fit in this `assert(o)`?
> steps to reproduce:
>
> save the file and try to compile it with `hare build`
> ```
> export type foo = struct {
> bar: int
> };
>
> export def FOO = foo { bar = 0 };
> ```
>
> it triggers a TODO (src/typedef.c:172) that I would like to fix. I'm
> just not sure what's actually happening in this specific function. as
> far as I could guess, it produces the exported definitions of types and
> any exported object that uses these types.
>
> what exactly should fit in this `assert(o)`?
You guessed correctly, typedef.c produces Hare typedef files that contain the
public inferface of a module, so if you want to export a struct constant, its
value has to be specified in the typedef file in order for other modules to be
able to use it. Typedef file syntax is just regular Hare syntax at the moment.
That assert should be replaced by something that produces the textual
representation of a struct/union literal from a literal expression.