I use vscode+merlin to read ocaml code.Sometimes it can give me a value's type,but sometimes it only tell me a type of a value is 'a,that same to tell me nothing.I have to guest a value's type by reading the code.Reading the code to conclude a value's type is important,but sometimes I doult if my guest is right
so I want a method that I can get a value's type in runtime,like java or c#'s reflection:
var a = 1;
Console.WriteLine(a.GetType());
Is there some way to do the same thing in ocaml?Thanks!
Aucun commentaire:
Enregistrer un commentaire