caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] variance/injectivity/uniqueness annotations for types
@ 2016-03-11  6:53 Milan Stanojević
  2016-04-14  9:56 ` Jacques Garrigue
  0 siblings, 1 reply; 2+ messages in thread
From: Milan Stanojević @ 2016-03-11  6:53 UTC (permalink / raw)
  To: Caml List

I ran into some variance/injectivty issues in my code, plus I saw some
recent question here, and I was wondering if there was any progress on
adding syntax so types can be annotated with proper information (as
discussed in http://caml.inria.fr/mantis/view.php?id=5985).

I guess we don't really need new syntax, we can just use attributes
(e.g. [@@unique] or [@@injective])

I searched mantis a bit but I don't see anything new (maybe I didn't
search hard enough).

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] variance/injectivity/uniqueness annotations for types
  2016-03-11  6:53 [Caml-list] variance/injectivity/uniqueness annotations for types Milan Stanojević
@ 2016-04-14  9:56 ` Jacques Garrigue
  0 siblings, 0 replies; 2+ messages in thread
From: Jacques Garrigue @ 2016-04-14  9:56 UTC (permalink / raw)
  To: Milan Stanojević; +Cc: OCaML List Mailing

On 2016/03/11 15:53, Milan Stanojević wrote:
> 
> I ran into some variance/injectivty issues in my code, plus I saw some
> recent question here, and I was wondering if there was any progress on
> adding syntax so types can be annotated with proper information (as
> discussed in http://caml.inria.fr/mantis/view.php?id=5985).
> 
> I guess we don't really need new syntax, we can just use attributes
> (e.g. [@@unique] or [@@injective])
> 
> I searched mantis a bit but I don't see anything new (maybe I didn't
> search hard enough).


The situation seems to be stuck currently, waiting for concrete examples
where this is really needed, and also for a good syntax.
Indeed, in other discussions, there seemed to be an agreement that
attributes were not very good for changing the type system itself, as they
are somehow outside of the language. Moreover, injectivity would be rather
heavy, as this is a per-parameter property. Concerning uniqueness,
Alain Frisch made some interesting suggestion of using a global name or
path to make types distinguishable.

Jacques Garrigue

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-14  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-11  6:53 [Caml-list] variance/injectivity/uniqueness annotations for types Milan Stanojević
2016-04-14  9:56 ` Jacques Garrigue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).