- Phi - PureScript-like functional programming language compiled to BEAM using Erlang AST.
- Phi is a strongly-typed with compile-time type-checking and built-in support for concurrency and distribution.
- Phi empowers SYNRC to build scalable, reliable, real-time applications, especially for 5G, IoT, and edge computing.
mix phi.base # Compile Base Library
mix phi.compile # Compile *.phi Files
mix phi.repl # Start Phi Shell
mix phi.test # Run Phi QuickCheck Tests
- Speed over Simplicity.
- Reliability and Predictivness over Featureness.
- Avoid Bullshit at All Costs.
- Back to Miranda Roots
$ time mix phi.base 2.28s user 1.18s system 111% cpu 3.113 total
$ time mix phi.test 2.75s user 1.36s system 101% cpu 4.067 total
This meant to be learning excercise on how to implement simple educational HM language codenamed Phi (stands for Philosophy, author of PureScript Phil, and Fibonacci misspelling) for Erlang naturally, but things got out of control eventually. Same excercise could and should be applied for Idris for fibrational Pi and Sigma capabilities for those who blatantly dislike the syntax of glorious Coq. As for Miranda syntax for Erlang dependently typed prover I name Sigma project and for Coq inspired architecture there is already project in Groupoid, Christine.
The Christine syntax could should be compatible with Erlang implementation once it emerges. As for technical hints please take the following heart advise:
- Start with classical HM or MLTT typechecker
- Learn Erlang AST complitation by Henk or Per examples
- Don't use Erlang guards for anything as they slowdown compilation
- Don't use Kahn's Topological sort for anything as we are runtime
- In runtime always choose first Type Class instance
- Pay Attention to Curring in code generation
- Pay Attention to FFI
- Pay Attention to Process modality
- Compilation of Base Library in 5 seconds
- Functional programming
- PureScript style
- Compile-time type Checking/Inference
- Algebraic data type (ADT)
- Functions, higher-order functions
- Currying and partial application
- Pattern matching, and Guards
- List comprehension
- Featured Absence of HKT
- Applicative and Monad
- Advanced module system
- Built-in concurrency
This language was created by non-human impersonated spirits of these guys:
- Miranda Team (David Turner)
- Haskell Team (Simon Peyton Jones)
- PureScript Team (Phil Freeman)
- Hamler Team (Feng Lee)
- ML/LCF Team (Robin Milner)
- Prolog Team (Alain Colmerauer with Philippe Roussel)
- Erlang Team (Joe Armstrong)
- Elixir Team (José Valim)
- Groupoid Team (Namdak Tonpa)
DHARMA LICENSE