All Projects → finkel-lang → Finkel

finkel-lang / Finkel

Licence: bsd-3-clause
Haskell in S-expression

Programming Languages

haskell
3896 projects
language
365 projects
lisp
113 projects

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
Mond
A scripting language for .NET Core
Stars: ✭ 237 (+62.33%)
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
Bic
A C interpreter and API explorer.
Stars: ✭ 719 (+392.47%)
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
English Script
🖊 English as a programming language
Stars: ✭ 136 (-6.85%)
Mutual labels:  compiler
Shaderc Rs
Rust bindings for the shaderc library.
Stars: ✭ 143 (-2.05%)
Mutual labels:  compiler
Gomacro
Interactive Go interpreter and debugger with REPL, Eval, generics and Lisp-like macros
Stars: ✭ 1,784 (+1121.92%)
Mutual labels:  repl
R9cc
Toy C compiler
Stars: ✭ 139 (-4.79%)
Mutual labels:  compiler
Nudge4j
Get inside your JVM
Stars: ✭ 144 (-1.37%)
Mutual labels:  repl
Prance
Resolving Swagger/OpenAPI 2.0 and 3.0 Parser
Stars: ✭ 133 (-8.9%)
Mutual labels:  compiler
Glsl
GLSL parser for Rust
Stars: ✭ 145 (-0.68%)
Mutual labels:  compiler
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
Tendra
The TenDRA Project
Stars: ✭ 134 (-8.22%)
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
Tasmocompiler
Web GUI for custom Tasmota compilation
Stars: ✭ 143 (-2.05%)
Mutual labels:  compiler

Finkel

Build status Documentation Codecov

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].