Skip to content

coq-io/system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo IO System

Library of Unix effects for Coq. See also Coq.io.

build status

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.effect unit :=
  System.log (LString.s "Hello world!").

Install

Using OPAM for Coq:

opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq-io-system

Documentation

See http://coq.io/.

Extraction

To run a program you can extract it to OCaml. Do:

Definition main := Extraction.launch hello_world.
Extraction "main" main.

You can now compile and execute main.ml:

ocamlbuild main.native -use-ocamlfind -package io-system
./main.native