package alba
Alba compiler
Install
Dune Dependency
Authors
Maintainers
Sources
0.4.4.tar.gz
sha256=4817038301d3e45bac9edf7e6f2fc8bf0a6d78e76e02ad7ea33ef69bcc17df3b
md5=25234357587126685d64f16236167937
doc/alba.fmlib/Fmlib/Io/index.html
Module Fmlib.Io
Definition of an enviroment for console applications which can run natively or under nodejs or any other module which satisfies the signature SIG
.
The Fmlib helps you to develop Ocaml programs which run natively and can be compiled to javascript without changing the code of the application.
You develop your program as a functor accepting a module argument of type SIG
. The program does all input/ouptut via the module Io
.
(* Content of file [program.ml] *)
module Make (Io: Io.SIG) =
struct
let run _: unit =
let open Io in
Process.execute
(Stdout.line "Hello world")
end
The library provides two instances of type Io.SIG
. One is Fmlib_native.Io
for native applications and the other is Fmlib_node.Io
for nodejs applications.
You can make a native application by
module P = Program.Make (Fmlib_native.Io)
let _ =
P.run ()
and a nodejs application by
module P = Program.Make (Fmlib_node.Io)
let _ =
P.run ()
module Error : sig ... end
IO Errors
module type STAT = sig ... end
Statistic data about a file/directory.
module type SIG = sig ... end
Signature of an IO environment.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>