The RAML 1.0 specification does not state whether types must be defined above references to the type from other named types. While YAML is happy to ignore order, it should be spelled out for RAML separately, especially since implementations may have order information available.
I think RAML actually does not care about that either.
types: Foo: type: Bar Bar:
The above does validate fine for me.