Extended 'Succ attribute?



Hello,

I just started Ada and was wondering if there is a way to make the Succ
attribute of discrete types behave in a cyclic manner (akin to the
modular type):

type T_DAY is (Mon, Tue, Wed, Thu, Fri, Sat, Sun);

...

day := T_DAY'(Sun);
day := T_DAY'Succ(day); -- that this returns 'Mon' instead of
-- a type constraint error

I could of course define my own function to do this, but I wish to know
if there is a way to get Ada to do it itself.

Regards,

Jérémie

.