mark-constructor-flat-parameters := λ(: base-type Type)(: flat-tag String)(: flat-arity U64)(: flat-type List)(: pi U64). (: ( (match flat-type ( () ( LEOF () ) ( (LCons( p1 rst )) ( (if (is-parameter-flat( flat-tag flat-arity pi )) ( (mark-constructor-flat-parameters( base-type p1 )) ) ()) (mark-constructor-flat-parameters( base-type flat-tag flat-arity rst (+( pi 1_u64 )) )) )) )) ) Nil); mark-constructor-flat-parameters := λ(: base-type Type)(: flat-type Type). (: ( (match flat-type ( () ( (TGround( 'Cons_s (LCons( p2 (LCons( p1 LEOF )) )) )) ( (mark-constructor-flat-parameters( base-type p1 )) (mark-constructor-flat-parameters( base-type p2 )) )) ( (TGround( flat-tag flat-ps )) ( (mark-constructor-flat-parameters( base-type flat-tag (arity flat-type) flat-ps 1_u64 )) )) ( (TVar v) ( (mark-parameter-flat( (tag-of base-type) (arity base-type) (parameter-number( base-type v )) )) )) ( _ () ) )) ) Nil);