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
[Caml-list] Is arrow programming impossible in ocaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-10-13 (23:54)
From: Nick Name <nick.name@i...>
Subject: [Caml-list] Is arrow programming impossible in ocaml?
Hi all, I am trying to work on a project where I need ocaml efficiency 
with rank-2 polymorphism, if I got it correctly (I am not an expert in 
programming language semantics). 

Basically I am trying to reproduce FRAN-like usage of arows as in 


so I have defined my own arrow module etc, but I faced the rank-1 
polymorphism restriction of ocaml. I have cut down my example to:

type ('a,'b) t = 'a -> 'b

let rec arr f = f

let a = arr (fun x -> x)

and "a" is typed like '_a -> '_a , where I would like it to be typed 'a 
-> 'a.

Does anyone think I have other possibilities in writing that kind of 
higher-order combinator based code, or is it impossible?



To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners