Browse thread
surprising type error with labels
- Jake Donham
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Jake Donham <jake@d...> |
| Subject: | surprising type error with labels |
Hi list,
Why does
ListLabels.find (fun _ -> true) [];;
produce
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,
Jake