Take the 2-minute tour ×

When I try to compile an Opa program with

m: stringmap(list(string)) = StringMap.empty()

I get this error:

Function was found of type ordered_map(string, 'a, String.order) but application expects it to be of type  -> 'b.

I'd appreciate any hint/help to figure out what's wrong with my code. TIA,


share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You probably want to write this:

m: stringmap(list(string)) = StringMap.empty

-> 'b refers to StringMap.empty() in the type error you quoted, which is incompatible with your coercion.

share|improve this answer
Thanks. So if I understand it right, StringMap.empty is a predefined empty stringmap and when I say m = StringMap.empty it is just cloned and assigned to m? –  Bahman M. Oct 19 '11 at 12:02
add comment

Your Answer


