[m-dev.] Array modes
Mark Brown
mark at mercurylang.org
Sat Oct 25 18:26:47 AEDT 2014
On Sat, Oct 25, 2014 at 4:28 PM, Julien Fischer <jfischer at opturion.com> wrote:
>
> Hi,
>
> On Sat, 25 Oct 2014, Zoltan Somogyi wrote:
>
>> On Sat, 25 Oct 2014 15:32:10 +1100, Mark Brown <mark at mercurylang.org>
>> wrote:
>>>
>>> I think these "bogus" constructors are really useful for foreign types
>>> that act as containers for Mercury terms, of which arrays are one
>>> example, so I don't agree with disallowing them entirely as is
>>> suggested in that thread.
>>
>>
>> I have long thought that having insts that are not bound to a specific
>> type
>> is a bad idea. I would even support a change in the language to require
>> each inst definition to say what type it is for.
That's fine. In this case the inst would be bound to the foreign type
array/1, and be immediately recognised as a "bogus" constructor.
>
>
> As would I. I don't think it's going to be possible to ever clear up
> <https://www.mercurylang.org/bugs/view.php?id=89> without such a change.
Foreign types never have type_infos inserted anywhere. So you won't
hit this bug if there is an inst for a foreign type.
Cheers,
Mark.
More information about the developers
mailing list