English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
How to do this properly with OCaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-07-25 (08:44)
From: Alex Baretta <alex@b...>
Subject: Re: [Caml-list] "Just say no!" campaign against Obj
Stephane Glondu wrote:
> On Sunday 24 July 2005 00:27, Alex Baretta wrote:
> Forgive my ignorance... I never heard of "polymorphic recursion" before. Is 
> it exactly polymorphic records (in which case I don't understand where the 
> name "polymorphic recursion" is from), or something else?

A function definition is monomorphic-recursive when all recusive calls
induce unifiable type constraints. With a few exceptions from the world
of polymorphic variants, this means that all recursive calls take
parameters of the same type.

Polymorphic recursion arises when a recursive function is defined on a
non-uniformly recursive data structure, such that the decomposition of
the datastructure at each recursive step produces one or more
sub-structures whose type is different from (non-unifiable with) with
that of the formal parameter.

Maybe the more theoretical gurus on the list will be able to clarify
this issue with some self-contained examples.


Baretta DE&IT
A division of Baretta SRL

tel. +39 02 370 111 55
fax. +39 02 370 111 54

Our technology:

The Application System/Xcaml (AS/Xcaml)

The FreerP Project