Le Thu, 03 Apr 2014, David Allsopp a écrit : > Yotam Barnoy wrote: > > 2. What is demonstrated in lines 114-117 regarding polymorphic variant row fields: > > > >  | Rtag of label * bool * core_type list > >        (* [`A]                   ( true,  [] ) > >           [`A of T]              ( false, [T] ) > >           [`A of T1 & .. & Tn]   ( false, [T1;...Tn] ) > >           [`A of & T1 & .. & Tn] ( true,  [T1;...Tn] ) > >         *) > > > > What does the bool value represent? > > It indicates that the constructor is constant, or that one of the types in the conjunction is "empty" (i.e. constant - I don't know what Jacques' terminology for that is!) I might miss something, but wouldn't this be more readable if a variant was used instead of booleans? Say, type includes_constant = | IncludesConstant | DoesNotIncludeConstant ... | RTag of label * includes_constant * core_type list (* [`A] (IncludesConstant, []) [`A of T] (DoesNotIncludeConstant, [T]) .... It would also be easier to extend. That's just nitpicking but I think it would make the code more explicit by itself. In addition, I never heard about conjunctions in variants, so I'm happy Yotam started this initiative... Cheers, -- Simon http://weusepgp.info/ key 49AA62B6 fingerprint 949F EB87 8F06 59C6 D7D3 7D8D 4AC0 1D08 49AA 62B6