Gael> The organization of the code has to be adapted: sources.cm and Gael> mlb files have to be rewritten in some equivalent for polyml
Yes. I use driver files that are actually written in ML. The PolyML structure (and especially PolyML.Compiler) is your friend.
Gael> Some libraries will be missing (from my first attempt, it seems Gael> that smlnj basis is bigger than what is provided in polyml)
Do you really mean basis, or the smlnj-lib? From the latter, I have ported all of Util, and I'm working (now & then, when I have time) on the rest.
Gael> Interfaces with C will have to be adapted (among others: does it Gael> exist an easy way to have nlffi in polyml?)
Not that I know.
Gael> Some grammar constructs may not be accepted by polyml. For Gael> example: case x of (0 | 1) => true | _ => false; is not accepted Gael> in polyml
This is not Standard ML, so it won't work in MLton, either. In fact I'm pretty sure it is discussed in the "Deviations of SML/NJ" article on MLton wiki.