[mercury-users] integer enumerations

Michael Day mcda at students.cs.mu.oz.au
Wed Jul 26 12:43:05 AEST 2000


Has any work been done in Mercury to allow integer types limited to a
fixed set of values, or a fixed range of values?

Alternatively, how about a pragma hack for discriminated union types for
easy interfacing with C libraries...

:- type some_c_enum
        --->    foo     = some hack to set value to 1
        ;       bar     = some hack to set value to 2
        ;       baz     = some hack to set value to 17
        .

Michael

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list