From: "François Pottier" <francois.pottier@inria.fr>
To: Aaron Gray <aaronngray.lists@gmail.com>
Cc: OCaML Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] coinductive data types
Date: Wed, 31 Aug 2022 10:19:28 +0200 [thread overview]
Message-ID: <57aa59a7-a7fd-4578-010b-25dfc1a1e12e@inria.fr> (raw)
In-Reply-To: <CANkmNDfUOOGcbj5Ty6tNUU0ADikxGCim0==ExPxuwoqQT_jqkQ@mail.gmail.com>
Hello,
Le 30/08/2022 à 18:32, Aaron Gray wrote:
> What I have gathered is that in order to have completeness of type
> system and soundness you need the type system to be implemented as a
> type lattice, there by underpinning the system on to a topological
> space and thus being constructable and well founded.
I am not sure what you mean by "soundness and completeness of the system".
A type system is considered "sound" if a well-typed program cannot crash.
A type-checking or type inference algorithm is considered "sound and
complete"
provided it declares a program well-typed if and only if this program is
indeed well-typed. (I am simplifying the statement a bit.) This implies that
the property of being well-typed is decidable.
It is not necessary in principle for the subtyping relation to be a lattice.
The lattice property can help (e.g. it can help simplify subtyping
constraints, when performing type inference in the presence of subtyping).
> I don't know how accessible OCaML's, type system code is. I have had a
> brief look, I am used to Haskell, and Haskell's type annotations in
> order to get my bearings.
>
> Are there any papers on OCaML's type system proper at all please ?
The code of the OCaml type-checker is publicly available but is not easy
to read.
There are several papers covering several aspects of the type system,
but I am
not sure which one would be most relevant here. Perhaps "GADTs Meet
Subtyping"
by Gabriel Scherer and Didier Rémy, which discusses the combination of
*generalized* algebraic data types and subtyping.
I hope this helps,
--
François Pottier
francois.pottier@inria.fr
http://cambium.inria.fr/~fpottier/
next prev parent reply other threads:[~2022-08-31 8:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 15:43 Aaron Gray
2022-08-30 7:24 ` François Pottier
2022-08-30 11:11 ` Xavier Leroy
2022-08-30 12:33 ` Aaron Gray
2022-08-31 1:21 ` Jacques Garrigue
[not found] ` <11E3A59A-BD33-4EC0-9FAD-711A1EACA35E@gmail.com>
2022-08-31 3:22 ` Aaron Gray
2022-09-01 12:13 ` Jacques Garrigue
2022-08-30 12:37 ` Aaron Gray
2022-08-30 13:57 ` Nate Foster
2022-08-30 15:27 ` Aaron Gray
2022-08-30 15:47 ` François Pottier
2022-08-30 16:32 ` Aaron Gray
2022-08-31 8:19 ` François Pottier [this message]
2022-08-30 16:45 ` Andreas Rossberg
2022-08-30 17:01 ` Aaron Gray
2022-08-30 18:20 ` Nate Foster
2022-08-31 8:25 ` François Pottier
2022-08-31 8:46 ` Peter Thiemann
2022-08-31 9:41 ` Andreas Rossberg
2022-08-31 13:49 ` François Pottier
2022-08-31 15:40 ` Peter Thiemann
2022-08-31 16:44 ` Andreas Rossberg
2022-08-31 15:55 ` Basile Clement
2022-08-31 18:42 ` Andreas Rossberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57aa59a7-a7fd-4578-010b-25dfc1a1e12e@inria.fr \
--to=francois.pottier@inria.fr \
--cc=aaronngray.lists@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox