Re: design question

2022-02-08 Thread Hongwei Xi
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

Re: design question

2022-02-08 Thread Vanessa McHale
You could I suppose have a polymorphic type and pass in ‘void’. I had an idea for something here: http://blog.vmchale.com/article/ann In ATS I guess it would be datatype Impossible datatype A(phantom: type) = A | B | C of (phantom) Then A(Impossible)

design question

2022-02-08 Thread Raoul Duke
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