finkel-lang / Finkel
Licence: bsd-3-clause
Haskell in S-expression
Stars: ✭ 146
Projects that are alternatives of or similar to Finkel
Akilang
A compiler for a simple language, built with Python and LLVM
Stars: ✭ 71 (-51.37%)
Mutual labels: compiler, repl
Lfortran
Official mirror of https://gitlab.com/lfortran/lfortran. Please submit pull requests (PR) there. Any PR sent here will be closed automatically.
Stars: ✭ 220 (+50.68%)
Mutual labels: compiler, repl
Red
Red is a next-generation programming language strongly inspired by Rebol, but with a broader field of usage thanks to its native-code compiler, from system programming to high-level scripting and cross-platform reactive GUI, while providing modern support for concurrency, all in a zero-install, zero-config, single 1MB file!
Stars: ✭ 4,725 (+3136.3%)
Mutual labels: compiler, repl
Elm Platform
Bundle of all core development tools for Elm
Stars: ✭ 775 (+430.82%)
Mutual labels: compiler, repl
Rascal
The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
Stars: ✭ 284 (+94.52%)
Mutual labels: compiler, repl
I8086.js
16bit Intel 8086 / 80186 + X87 emulator written in TypeScript with REPL assembly compiler and tiny C compiler
Stars: ✭ 54 (-63.01%)
Mutual labels: compiler, repl
Brain
An esoteric programming language compiler on top of LLVM based on Brainfuck
Stars: ✭ 112 (-23.29%)
Mutual labels: compiler, repl
Gomacro
Interactive Go interpreter and debugger with REPL, Eval, generics and Lisp-like macros
Stars: ✭ 1,784 (+1121.92%)
Mutual labels: repl
Nim
Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
Stars: ✭ 12,270 (+8304.11%)
Mutual labels: compiler
Swc
swc is a super-fast compiler written in rust; producing widely-supported javascript from modern standards and typescript.
Stars: ✭ 18,627 (+12658.22%)
Mutual labels: compiler
Finkel
Finkel is a statically typed, purely functional, non-strict-by-default dialect of the Lisp programming language.
Or in other words, Haskell in S-expression.
Features
- Integration with existing Haskell modules.
- Building Haskell-compatible Cabal packages.
- Documentation generation with Haddock.
- Lisp style macro system.
- Tool executable, including interactive REPL.
Example
Sample code
;;;; File: fib.fnk
(:doc "Simple example module to show fibonacci number.
The compiled executable takes an integer argument from command line
input and print the fibonacci number of the argument.")
(defmodule Main
(import
(System.Environment (getArgs))))
(defn (:: main (IO ()))
"The main entry point function."
(>>= getArgs (. print fib read head)))
(defn (:: fib (-> Int Int))
"Naive fibonacci function."
[0] 0
[1] 1
[n] (+ (fib (- n 1))
(fib (- n 2))))
Compiling an executable
$ finkel make -o fib fib.fnk
[1 of 1] Compiling Main ( fib.fnk, fib.o )
Linking fib
$ ./fib 10
55
Running REPL
$ finkel repl
Hit `Ctrl-d' or type ,q to quit, type ,? for help.
> ,load fib.fnk
[1 of 1] Compiling Main ( fib.fnk, interpreted )
; loaded fib.fnk
> ,info fib
fib :: Int -> Int -- Defined at fib.fnk:16:11
> (map fib [1 .. 10])
[1,1,2,3,5,8,13,21,34,55]
> (System.Environment.withArgs ["10"] main)
55
> ,q
Further resources
See the documentation for more details.
Contributing
Contributions are welcome. Please see the CONTRIBUTING.md.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].