package sifun
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
md5=0314c1c1b0922e47ec33b040b16b87bb
sha512=357ded7e85079a24a45daf390bcead56ff5d4e62676759973452abb648cddcb684f3dfa48317c0a4233520981c81a0542b58250aeef84871c0381cb7514dc35b
Description
Added to opam-repository:
README
SiFun
Interpreter for SiFun (Simple Functional) Language with three different type systems (supports Higher-Rank Polymorphism).
Currently supports Hindley–Milner type system (simply typed lambda calculus) and Hindley–Milner with Visible Type Application (similar to System F).
Under development is a Bidirectional Typechecking System which will support Higher-Rank Polymorphism without typed function and type application.
Installation
You can clone this repository using:
git clone git@github.com:kkd26/SiFun.git
cd SiFun
opam install .or use the official opam release using:
opam install sifunUsage
There are two ways to interact with the interpreter:
SiFun REPL (Read–eval–print loop) - interactive console
sifuniSiFun Interpreter - run from file
sifun <filename>
SiFun Language syntax
The basic language supports (similar to Hindley–Milner type system):
- integers
1,2,3, ... - booleans
true,false - variables
x,y, ... - pairs
(1, true) - first and second
fst (1,3),snd (4,5), ... - functions
fn x => x,fn x => fn y => (x,y), ... - application
(fn x => (1,x)) 2, ...
The additional features are (similar to System F):
- typed functions
fn x : int => x, ... - type variables
a,b,c, ... - poly types
forall a. a->a,forall a b c. a->b->c, ... - big lambda
lam a. (int, fn x : a => x),lam a b c. fn x : a => x, ... - type application
(lam a. fn x : a => x) {int}, ...
Note that ; separates blocks of code and ;; sends EOF, so stops execution.
You can check ./examples for more information about the syntax and semantics.
Dev Dependencies (3)
-
bisect_ppx
with-test & >= "2.5.0" -
ounit2
with-test -
odoc
with-doc
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building sifun with each compiler on check.ci.ocaml.org, run of against opam-repository 7cdc698. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 3.0.0 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure