2

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,

--
Bahman

BahmanM
  • 1,420
  • 10
  • 18

1 Answers1

1

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.

Cédrics
  • 1,974
  • 11
  • 13
  • 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`? – BahmanM Oct 19 '11 at 12:02