[m-dev.] Array modes
Julien Fischer
jfischer at opturion.com
Mon Oct 27 23:10:19 AEDT 2014
Hi Mark,
On Sat, 25 Oct 2014, Mark Brown wrote:
> 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.
I know. I was just mentioning this as another reason for requiring
insts to be typed.
Cheers,
Julien.
More information about the developers
mailing list