[m-dev.] dummy types and user defined equality
Julien Fischer
juliensf at cs.mu.OZ.AU
Mon Mar 6 16:48:47 AEDT 2006
Do we consider dummy types, defined as below to be discriminated unions,
or are dummy types not allowed to have user-define equality?
:- module dummy_user_eq.
:- interface.
:- type bar ---> bar
where equality is unify_bar.
:- pred unify_bar(bar::in, bar::out) is det.
:- implementation.
:- import_module exception.
unify_bar(_, _) :- throw("heeeeeeeeeelp!").
The above results in:
Uncaught Mercury exception:
Software Error: rtti.m: Unexpected: type_ctor_rep_to_string: dummy type with user equality
Stack dump not available in this grade.
Julien.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list