<smarr>
Hi, the type checker isn't very happy with me today. I'm trying to create a structure where I have boolean, lists, and language objects inside of a list. The type checker throws with UnionErrors at me. So, I thought, ok, I probably need to use erasure as I do for my array storage strategies. Though, I am still not getting it to accept my code. I think one issue is that there's still some confusion in my head around how to use erasure.
<smarr>
Especially the list in list bit seems to be an issue. So, I guess the question is how do I handle that. If I simply erase the type from the list, that's still not compatible with my language objects. Do I need to have a list of erased items to make this work?
<arigato>
smarr: unsure exactly what you're trying to do, but: in the sense of the annotator, there is the type annotation "list of A" for every type annotation "A", and the type annotation "C-or-subclass" for every RPython class C, and a special annotation "erased" that's incompatible with everything else
<arigato>
ah no, "erased" is actually the annotation of llmemory.GCREF, which can also be handled directly by llmemory functions, but it's different from any other non-low-level RPython annotation
<arigato>
usually, you'd erase either a list or an instance of some class, using two different new_erasing_pair(), and then any of the erased stuff have the same annotation and can be stored into the same places
<arigato>
or you'd erase plain RPython ints, which gives something again with the same "erased" annotation
fotis has quit [Ping timeout: 268 seconds]
fotis has joined #pypy
Julian has quit [Quit: leaving]
greedom has quit [Remote host closed the connection]
fotis has quit [Ping timeout: 272 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 268 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 252 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 272 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 265 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 252 seconds]
fotis has joined #pypy
otisolsen70 has quit [Quit: Leaving]
fotis has quit [Ping timeout: 240 seconds]
daubers has quit [Remote host closed the connection]
jryans has quit [Write error: Connection reset by peer]