We've found a bug for you! /.../fixtures/primitives11.res:5:13-28 3 │ type a = option 4 │ type b = option 5 │ let a: a = (Some(Some(5)): b) 6 │ This has type: b (defined as option) But it's expected to have type: a (defined as option) The incompatible parts: bb (defined as option) vs aa (defined as option) Further expanded: int vs string You can convert int to string with Int.toString.