no, these two function is the 'primtive' of adt.
right now, pattern matching is implemented as: check if a pattern match the 
data, then unpack the data.
the 'check' part is is_x. the 'unpack' part is unpack_x.
one could imagine a typical example as follow:
fun double n = 
  match n
  | O => O
  | S n' => S (S n')
which double a peano natrual.
It could be decompiled into
fun double n =
  if (is_O n) then O else (if (is_S n) then S (S (unpack_S n).0) else fatal 
"unknown case")

-- 
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#issuecomment-527292772

Reply via email to