[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] How to use Functoria_app.Cmd.read, Functoria and utop
> Also, how can I test code using Functoria interactively using eg. 'utop'? > It'd make things much easier if I could try out the various subexpressions > interactively to see what the actual types are. #require “functoria.app”;; open Functoria_app;; match Cmd.read "echo %d" 4 with Ok s -> s | Error e -> failwith e;; - : string = "4\n” The type of `Cmd.read` just means that you can use the usual `printf`-style arguments and instead of printing it will return an `Ok of ‘a | Error of string` error. Best, Thomas _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |