System effects for Coq. See also coq:io.
Require Import Io.All.
Require Import Io.System.All.
Require Import ListString.All.
Import C.Notations.
Definition hello_world (argv : list LString.t) : C.t System.effects unit :=
System.log (LString.s "Hello world!").
Using OPAM for Coq:
opam repo add coq-stable https://github.com/coq/repo-stable.git
opam install coq:io:system
See the complete documentation online on doc/io-system.
To run a program you can extract it to OCaml. Do:
Definition main := Extraction.run hello_world.
Extraction "main" main.
You can now compile and execute main.ml
:
ocamlbuild main.native -use-ocamlfind -package io-system
./main.native