Keep attributes in front of type declarations in created interfaces
Why
Create interface copies a type declaration from the source starting at the declaration's location, which begins at type, after the attributes written in front of it. They were replaced by spaces, so @tag and @unboxed declarations got an interface whose runtime representation differs from the implementation's, and doc comments were lost. The copy now starts at the first of those attributes.
modifiedDiagnostic create interface
@tag("kind") type tagged = A(int) | B({x: int}) /** A documented type */type documented = int
rescript
Before
After
type tagged = A(int) | B({x: int}) @tag("kind") type tagged = A(int) | B({x: int})/** A documented type */type documented = inttype documented = int