Difference between revisions of "Haskell Lisp"

From HaskellWiki
Jump to navigation Jump to search
(→‎A Haskell-Lisp Toolbox: Added interpreter section)
m (→‎Lisps in Haskell: Updated links, notes about maintained state, etc.)
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
   
 
In practical terms, there are three areas of intersection between Haskell and Lisp:
 
In practical terms, there are three areas of intersection between Haskell and Lisp:
# Haskell implementations written in Lisp (there seems to be only one of these), and
+
# Haskell implementations written in Lisp (there seems to be only one of these)
 
# Lisps written in Haskell (much more common)
 
# Lisps written in Haskell (much more common)
 
# Haskell with Lisp Syntax (Lisp-flavoured Haskells)
 
# Haskell with Lisp Syntax (Lisp-flavoured Haskells)
Line 19: Line 19:
 
The following Lisps are not wrappers around Haskell, but rather their own languages. Some may offer interop with FFI calls.
 
The following Lisps are not wrappers around Haskell, but rather their own languages. Some may offer interop with FFI calls.
   
  +
* [https://github.com/carp-lang/Carp Carp] - Carp is a statically typed Lisp designed to work well for for real-time, interactive applications and performance-sensitive use cases like games, sound synthesis and visualizations.
* [https://github.com/haskell-lisp/husk-scheme Husk Scheme] - Implements a superset of the R5RS standard and a large portion of the R7RS-small language. Advanced features are provided including continuations, hygienic macros, libraries, and a full numeric tower. Actively maintained.
 
  +
* [https://lexi-lambda.github.io/hackett/ Hackett] - Hackett is an attempt to implement a Haskell-like language with support for Racket’s macro system, built using the techniques described in the paper [http://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf Type Systems as Macros]. It is currently extremely work-in-progress. [https://github.com/lexi-lambda/hackett Github project]
 
* [https://github.com/justinethier/husk-scheme Husk Scheme] - Implements a superset of the R5RS standard and a large portion of the R7RS-small language. Advanced features are provided including continuations, hygienic macros, libraries, and a full numeric tower. Actively maintained.
 
* [https://www.egison.org/ Egison] - Written in Haskell, Egison is a Lisp that realizes non-linear pattern-matching against non-free data types, directly representing pattern-matching against a wide range of data types such as lists, multisets, sets, trees and graphs.
 
* [https://www.egison.org/ Egison] - Written in Haskell, Egison is a Lisp that realizes non-linear pattern-matching against non-free data types, directly representing pattern-matching against a wide range of data types such as lists, multisets, sets, trees and graphs.
 
* [https://github.com/mthom/shentong Shentong] - The [http://www.shenlanguage.org/ Shen programming language] is a Lisp that offers pattern matching, lambda calculus consistency, macros, optional lazy evaluation, static type checking, one of the most powerful systems for typing in functional programming, portability over many languages, an integrated fully functional Prolog, and an inbuilt compiler-compiler. Shentong is an implementation of Shen written in Haskell.
 
* [https://github.com/mthom/shentong Shentong] - The [http://www.shenlanguage.org/ Shen programming language] is a Lisp that offers pattern matching, lambda calculus consistency, macros, optional lazy evaluation, static type checking, one of the most powerful systems for typing in functional programming, portability over many languages, an integrated fully functional Prolog, and an inbuilt compiler-compiler. Shentong is an implementation of Shen written in Haskell.
* [https://github.com/haskell-lisp/leesp Leesp] - Like Husk, this was written as part of the popular Scheme/Haskell tutorial. Actively maintained.
+
* [https://github.com/haskell-lisp/leesp Leesp] - Like Husk, this was written as part of the popular Scheme/Haskell tutorial.
 
* [https://github.com/haskell-lisp/blaise Blaise] - Slava Akhmechet's Lisp from 2006, updated by community members to run on the lastest version of GHC. The original author likely disavows any interest :-)
 
* [https://github.com/haskell-lisp/blaise Blaise] - Slava Akhmechet's Lisp from 2006, updated by community members to run on the lastest version of GHC. The original author likely disavows any interest :-)
   
 
= Haskell with Lisp Syntax =
 
= Haskell with Lisp Syntax =
   
  +
* [https://axellang.github.io/ Axel] - Haskell's semantics, plus Lisp's macros; a purely functional, extensible, and powerful programming language. [https://github.com/axellang/axel Github project].
 
* [https://github.com/haskell-lisp/liskell Liskell] - From the ILC 2007 paper: "Liskell uses an extremely minimalistic parse tree and shifts syntactic classification of parse tree parts to a later compiler stage to give parse tree transformers the opportunity to rewrite the parse trees being compiled. These transformers can be user supplied and loaded dynamically into the compiler to extend the language." Has not received attention for a while, though the author has stated that he continues to think about it and has future plans for it.
 
* [https://github.com/haskell-lisp/liskell Liskell] - From the ILC 2007 paper: "Liskell uses an extremely minimalistic parse tree and shifts syntactic classification of parse tree parts to a later compiler stage to give parse tree transformers the opportunity to rewrite the parse trees being compiled. These transformers can be user supplied and loaded dynamically into the compiler to extend the language." Has not received attention for a while, though the author has stated that he continues to think about it and has future plans for it.
 
* [https://github.com/haskell-lisp/historic-lisk Lisk] - Inspired by Liskell, but with the intent of making different design choices. Uses the [http://hackage.haskell.org/package/haskell-src-exts haskell-src-exts] AST and pretty printer to convert Lisk code to Haskell. 100% abandoned; interested parties are actively (and nicely!) discouraged by the original author. The name is being bandied about for a potential new Haskell+Lisp effort (blessed by the original author).
 
* [https://github.com/haskell-lisp/historic-lisk Lisk] - Inspired by Liskell, but with the intent of making different design choices. Uses the [http://hackage.haskell.org/package/haskell-src-exts haskell-src-exts] AST and pretty printer to convert Lisk code to Haskell. 100% abandoned; interested parties are actively (and nicely!) discouraged by the original author. The name is being bandied about for a potential new Haskell+Lisp effort (blessed by the original author).

Latest revision as of 16:55, 23 March 2021

Background

Lispers who love Haskell can be heard saying that Haskell is Lisp's missing M-Expression implementation. Though that statement embodies a great deal of poetic license (and perhaps romanticism), there is a very natural fit between the two.

In practical terms, there are three areas of intersection between Haskell and Lisp:

  1. Haskell implementations written in Lisp (there seems to be only one of these)
  2. Lisps written in Haskell (much more common)
  3. Haskell with Lisp Syntax (Lisp-flavoured Haskells)

There is a github organization which tracks these projects, though more detail is given below.

Also, there is a twitter account dedicated to all things Haskell+Lisp.

Haskells in Lisp

  • Yale Haskell - written between 1991 and 1993; was built from sources using CMU Common Lisp, Lucid Common Lisp, Allegro Common Lisp, Harlequin LispWorks, Kyoto Common Lisp. The last did suffer from performance problems, though. Compiled binaries were available for Sparc systems running SunOS 4.1.2 and Sparc 10's (sun4m) running 4.1.3. In the last release, the full functionality of X windows was made available at the Haskell level.

Lisps in Haskell

The following Lisps are not wrappers around Haskell, but rather their own languages. Some may offer interop with FFI calls.

  • Carp - Carp is a statically typed Lisp designed to work well for for real-time, interactive applications and performance-sensitive use cases like games, sound synthesis and visualizations.
  • Hackett - Hackett is an attempt to implement a Haskell-like language with support for Racket’s macro system, built using the techniques described in the paper Type Systems as Macros. It is currently extremely work-in-progress. Github project
  • Husk Scheme - Implements a superset of the R5RS standard and a large portion of the R7RS-small language. Advanced features are provided including continuations, hygienic macros, libraries, and a full numeric tower. Actively maintained.
  • Egison - Written in Haskell, Egison is a Lisp that realizes non-linear pattern-matching against non-free data types, directly representing pattern-matching against a wide range of data types such as lists, multisets, sets, trees and graphs.
  • Shentong - The Shen programming language is a Lisp that offers pattern matching, lambda calculus consistency, macros, optional lazy evaluation, static type checking, one of the most powerful systems for typing in functional programming, portability over many languages, an integrated fully functional Prolog, and an inbuilt compiler-compiler. Shentong is an implementation of Shen written in Haskell.
  • Leesp - Like Husk, this was written as part of the popular Scheme/Haskell tutorial.
  • Blaise - Slava Akhmechet's Lisp from 2006, updated by community members to run on the lastest version of GHC. The original author likely disavows any interest :-)

Haskell with Lisp Syntax

  • Axel - Haskell's semantics, plus Lisp's macros; a purely functional, extensible, and powerful programming language. Github project.
  • Liskell - From the ILC 2007 paper: "Liskell uses an extremely minimalistic parse tree and shifts syntactic classification of parse tree parts to a later compiler stage to give parse tree transformers the opportunity to rewrite the parse trees being compiled. These transformers can be user supplied and loaded dynamically into the compiler to extend the language." Has not received attention for a while, though the author has stated that he continues to think about it and has future plans for it.
  • Lisk - Inspired by Liskell, but with the intent of making different design choices. Uses the haskell-src-exts AST and pretty printer to convert Lisk code to Haskell. 100% abandoned; interested parties are actively (and nicely!) discouraged by the original author. The name is being bandied about for a potential new Haskell+Lisp effort (blessed by the original author).

A Haskell-Lisp Toolbox