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] Type inference problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-01 (07:58)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: [Caml-list] Type inference problem

I can't figure out what's wrong with my code =(

It's on a paste site, so will only last about 24 hours or so.

jonathan@moonbeam:~/dst/stdlib$ ocamlc
File "", line 106, characters 3-6:
This expression has type int but is here used with type unit

It -has- to return int ;-) But I have no idea where the type
constraint is coming from that wants it to return unit. Change it to
return unit, and where it's used complains it doesn't return type int
(so that constraint is correct).