Currently, my practice is just declare something like: abstype myenum = int
or abstype myenum(i:int) = int Then implement 'myenum' somewhere in a file. It can clearly be done, but it is really tedious, involving a lot of boilerplate type of code. I suppose some kind of meta-programming can be supported so as to reduce/eliminate this kind of coding. On Tue, Feb 8, 2022 at 6:47 PM Raoul Duke <rao...@gmail.com> wrote: > hi, a scenario > > enum of n values. > api function that takes the enum. > but throws error for some subset of enum values. > > how could we statically be told, enforce do not call the api fn in those > cases? > > besides "rtfm". > > -- > You received this message because you are subscribed to the Google Groups > "ats-lang-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ats-lang-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ats-lang-users/CAJ7XQb7erubNjQotU8ap_J4_4Eaks%2B%3DDabqyZU6jeRnGMYGf7w%40mail.gmail.com > <https://groups.google.com/d/msgid/ats-lang-users/CAJ7XQb7erubNjQotU8ap_J4_4Eaks%2B%3DDabqyZU6jeRnGMYGf7w%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoX0O-RraTymYT6JEJNzEmwRhQbJuUdEKT54tJrkCT8-A%40mail.gmail.com.