Hello, I want to give a try to MetaOcaml but utop ask me about the Trx module:
utop #
let rec spower n x =
if n = 0 then .<1>.
else if n mod 2 = 0 then .<square .~(spower (n/2) x)>.
else .<.~x * .~(spower (n-1) x)>. ;;
Line 1:
Error: Reference to undefined global `Trx’
utop #
let rec spower n x =
if n = 0 then .<1>.
else if n mod 2 = 0 then .<square .~(spower (n/2) x)>.
else .<.~x * .~(spower (n-1) x)>. ;;
Line 1:
Error: Reference to undefined global `Trx’
The file listing you provided in your first message shows there is no trx.cmo. This means that you won’t be able to use MetaOCaml with bytecode. However, it should work fine in native-code, since trx.cmx is available.
May be a good idea to find out if the bytecode limitation is due to a technical issue or if it is just an oversight in the distribution package.
Speaking off the top of my head, but MetaOCaml provides both bytecode and native code backends. So it should be a limitation in the distribution package – not so much an oversight as it might need some packaging work to support both?