# Is OCaml compiler configured with flat\_float\_array marshal compatible with no\_flat\_float\_array

**URL:** <https://discuss.ocaml.org/t/is-ocaml-compiler-configured-with-flat-float-array-marshal-compatible-with-no-flat-float-array/4863>\
**Category:** Learning\
**Created:** [December 14, 2019, 12:35pm UTC](https://discuss.ocaml.org/t/is-ocaml-compiler-configured-with-flat-float-array-marshal-compatible-with-no-flat-float-array/4863 "2019-12-14T12:35:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobzhang](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/bobzhang/32/553_2.png) [@bobzhang](https://discuss.ocaml.org/u/bobzhang)\
**Post date:** [December 14, 2019, 12:35pm UTC](https://discuss.ocaml.org/t/is-ocaml-compiler-configured-with-flat-float-array-marshal-compatible-with-no-flat-float-array/4863/1 "2019-12-14T12:35:24Z")

</div>

For BuckleScript compiler (OCaml-\>Readable JS), it makes more sense to configure it with no\_flat\_float\_array, my question is that if we configure it with no\_flat\_float\_array, would the cmt file generated by such compiler compatible with compiler configured with flat\_float\_array, otherwise we need also make sure other tools configured with the same compiler config (notably merlin) which is less ideal.  
Thanks

---

<div class="post-metadata">

**Author:** ![nojb](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/nojb/32/519_2.png) [@nojb](https://discuss.ocaml.org/u/nojb)\
**Post date:** [December 14, 2019, 7:31pm UTC](https://discuss.ocaml.org/t/is-ocaml-compiler-configured-with-flat-float-array-marshal-compatible-with-no-flat-float-array/4863/2 "2019-12-14T19:31:15Z")

</div>

My understanding is that, “flat float arrays” being a runtime representation issue, the `.cmt` files are identical in both cases.

---

<div class="post-metadata">

**Author:** ![nojb](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/nojb/32/519_2.png) [@nojb](https://discuss.ocaml.org/u/nojb)\
**Post date:** [December 14, 2019, 7:38pm UTC](https://discuss.ocaml.org/t/is-ocaml-compiler-configured-with-flat-float-array-marshal-compatible-with-no-flat-float-array/4863/3 "2019-12-14T19:38:22Z")

</div>

By the way, the subject to your post alludes to “marshal”; clearly float arrays marshalled with a “flat float array” compiler **cannot** be unmarshalled with a “no flat float array” compiler (and vice-versa).

---

<div class="post-metadata">

**Author:** ![bobzhang](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/bobzhang/32/553_2.png) [@bobzhang](https://discuss.ocaml.org/u/bobzhang)\
**Post date:** [December 15, 2019, 1:08am UTC](https://discuss.ocaml.org/t/is-ocaml-compiler-configured-with-flat-float-array-marshal-compatible-with-no-flat-float-array/4863/4 "2019-12-15T01:08:43Z")

</div>

Thanks for the reply. IIUC, the cmt(i) file or cmi (marshalled of typedtree) is compatible is due to that the typedtree does not contain float array, is that correct?

If someday the type definition of typedtree introduce float array, it will be incompatible in that case, is this right?

---

<div class="post-metadata">

**Author:** ![nojb](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/nojb/32/519_2.png) [@nojb](https://discuss.ocaml.org/u/nojb)\
**Post date:** [December 15, 2019, 6:52pm UTC](https://discuss.ocaml.org/t/is-ocaml-compiler-configured-with-flat-float-array-marshal-compatible-with-no-flat-float-array/4863/5 "2019-12-15T18:52:51Z")

</div>

Yes, that’s correct.
