Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rybla/functive
A simple modular extendible statically-typed symbolic programming language with dependent types. Implemented in Haskell.
https://github.com/rybla/functive
Last synced: about 5 hours ago
JSON representation
A simple modular extendible statically-typed symbolic programming language with dependent types. Implemented in Haskell.
- Host: GitHub
- URL: https://github.com/rybla/functive
- Owner: rybla
- License: bsd-3-clause
- Created: 2019-06-24T00:01:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-16T04:56:54.000Z (over 5 years ago)
- Last Synced: 2024-03-07T06:44:03.544Z (8 months ago)
- Language: Haskell
- Homepage:
- Size: 2.35 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# Functive
A simple modular extendible statically-typed symbolic programming language with dependent types.
Implemented in Haskell.## concepts
__simple__:
- clean and simple "low-level" functional programming language
- explicit abstract syntax i.e. parentheses are required
- inspired Gallina and the ML family (but without many extras)
- no annoying "syntactical-sugar" constructions built-in; all syntax is consistent and modular__extendible__:
- interface for easy implementations of macros and language constructs into pre-processor
- inspired by Racket and Coq's `Notation`__modular__:
- straighforward module system
- doesn't depend of file structure i.e. compilation/interpretation is done after concatenating all sourcecode together__statically-typed__:
- complete compile-time type-checking enforcement
- (named) typed holes in the form of `Assumption`s__symbolic__:
- symbolic representations of values
- if `f` is not defined and `(f x)` is evaluated, `f` is assumed to have the correct type and the value is the symbolic expression `(f x)`
- if two functions `f` and `g` are assumed this way and then compared (e.g. `f x = g x` is written) they are treated as distinct since their names are distinct__dependent types__:
- type constructors e.g. `list : type -> type`
- value-dependent types e.g. `finite : nat -> type`
- type variables e.g. `mul_identity : forall n:nat, n * 1 = n`
- explicit polymorphism e.g. `empty_list : forall a:type, list a`
- infinite type hierarchy e.g. `(type = type0) : type1 : type2 : type3 : ...`## organization
| directory | description |
| --- | --- |
| `src/` | haskell source-code. |
| `app/` | haskell executable source-code. |
| `test/` | haskell unit tests. |
| `doc/` | haskell documentation. |
| `design/` | reader-friendly design details (LaTex/PDF) |
| `examples/` | example _functive_ prorams. |## building
Using [stack](https://docs.haskellstack.org/en/stable/README/).
```sh
stack build
```## executing
Run unit tests with
```sh
stack test
```Run executable (`app/Main.hs`) with
```sh
stack exec functive-hs-exe
```## tutorial
TODO