

import STDLIB/default-instruction-set.lm;
import STDLIB/default-primitives.lm;
import STDLIB/default-rules.lm;
import STDLIB/default-stdlib.lm;

type Cases CaseOne | (CaseTwo( U64 )) | (CaseThree( U64 , U64 ));

main := (
   (match (CaseOne)  (
      ()
      ( (CaseOne) (print 'CaseOne_s) )
      ( (CaseTwo( x )) (tail( (print 'CaseTwo_s) (print x) )) )
      ( (CaseThree( x y )) (tail( (print 'CaseThree_s) (print x) (print y) )))
   ))
   (match (CaseTwo( 1_u64 ))  (
      ()
      ( (CaseOne) (print 'CaseOne_s) )
      ( (CaseTwo( x )) (tail( (print 'CaseTwo_s) (print x) )) )
      ( (CaseThree( x y )) (tail( (print 'CaseThree_s) (print x) (print y) )))
   ))
   (match (CaseThree( 2_u64 3_u64 ))  (
      ()
      ( (CaseOne) (print 'CaseOne_s) )
      ( (CaseTwo( x )) (tail( (print 'CaseTwo_s) (print x) )) )
      ( (CaseThree( x y )) (tail( (print 'CaseThree_s) (print x) (print y) )))
   ))
);
