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
surprising type error with labels
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-06-19 (21:38)
From: Jake Donham <jake@d...>
Subject: surprising type error with labels
Hi list,

Why does

 ListLabels.find (fun _ -> true) [];;


 Characters 16-31:
   ListLabels.find (fun _ -> true) [];;
 This expression should not be a function, the expected type is
 ('a -> 'b) list

I thought the rule was that "if an application is total, labels may be
omitted." (4.1 in the manual). (I was trying to do module List =
ListLabels at the top of a file.) Thanks,