Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 <>
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 Archives:
Bug reports: FAQ:
Beginner's list: