Robert Grosse

Results 126 comments of Robert Grosse

a) there are some changes I made in the process of writing a tutorial, so the example code shown in early parts of the tutorial differs from later parts of...

The match name thing looks like a bug, so I'll look into changing the example code later to avoid confusing people. Thanks for reporting this.

For 1, you should be able to just use a regular type variable. Perhaps it would help if you explained in more detail what you are trying to do.

If you want to print out the type, then you just follow the graph nodes and print it as desired. Note that fully simplifying it can take exponential time in...

`if true then 42 else "forty two"` just has the type `int | str`. There's no problem there.

I think it's best to explain in more detail what you are trying to actually accomplish so we can figure out what the best way to do it is. Printing...

The type system shown in cubiml was designed for transpilation to JS and was not designed for efficient static compilation. If that's what you want to do, you'll probably want...

Once you've done that, you can extract all the type information you want from the type graph. For a variable, just look at the set of VTypeHeads and/or UTypeHeads that...

@devdtc 1. The simplest approach would be to just hack in a special Use type head that contains mutable state which tracks what types have been checked against it previously...

`int | string` is equivalent to `top` in Cubiml, but it could be different depending on how you design your language (for example, including `typeof` as you suggested).