The type you want to give to this `get` function is problematic as it says that for any 'a it can produce a value of type ('a gadt). In particular I can create a (char gadt), and then use the fact that the type-checker knows that no such value exist to break the type soundness of OCaml -- cast any type to any other type.
I think you should try to get more familiar with how to manipulate GADT values from the OCaml side (in particular the need for "existential packing") before defining potentially unsafe and unsound FFI primitives, as the OCaml type-checker is really helpful in knowing what should not be done.
The question of how to express this kind of things safely (create GADT values whose GADT type parameter depends on a value determined only at runtime) is, justifiably, asked by anyone playing with GADTs for the first time. I think it would be very nice if we addressed it explicitly in the part of the manual discussing GADT:
http://caml.inria.fr/pub/docs/manual-ocaml-4.04/extn.html#sec238(We could then reuse the examples of existential packing in the part on existential types and error messages.)