Pattern matching is hard. currently, aot, vm, interpreter all has to implement 
pattern matching, and it is a huge source of complexity - the most complex code 
in aot is probably the pattern matcher.

there should be a pass to desugar pattern matching into if/else, however, there 
is no way to break up an ADT except using pattern matching, so it is impossible.

We should add two function automatically for every constructor:
is_x: is it that constructor?
unpack_x: if it is that constructor, read all values out and put them in a 
tuple. If not, fatal error.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/dmlc/tvm/issues/3874

Reply via email to